mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
C: fix support of weak references in GC
This commit is contained in:
parent
f028f8db37
commit
5a8284222a
|
@ -219,7 +219,7 @@ public final class GC {
|
||||||
if (object.queue != null) {
|
if (object.queue != null) {
|
||||||
enqueueMark(object.queue);
|
enqueueMark(object.queue);
|
||||||
if (object.next != null && object.object != null) {
|
if (object.next != null && object.object != null) {
|
||||||
enqueueMark(object);
|
enqueueMark(object.object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (object.next == null && object.object != null) {
|
if (object.next == null && object.object != null) {
|
||||||
|
@ -231,7 +231,7 @@ public final class GC {
|
||||||
private static void markReferenceQueue(RuntimeReferenceQueue object) {
|
private static void markReferenceQueue(RuntimeReferenceQueue object) {
|
||||||
RuntimeReference reference = object.first;
|
RuntimeReference reference = object.first;
|
||||||
while (reference != null) {
|
while (reference != null) {
|
||||||
enqueueMark(object);
|
enqueueMark(reference);
|
||||||
reference = reference.next;
|
reference = reference.next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user