Skip to content

Commit

Permalink
weakreference: gc: adds support for subclasses of WeakReference
Browse files Browse the repository at this point in the history
  • Loading branch information
flsobral committed Jul 19, 2021
1 parent b7c8b38 commit b9e5a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TotalCrossVM/src/tcvm/objectmemorymanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ static void markSingleObject(TCObject o, bool dump) // NEVER call this directly,
stackPush(objStack, &objs);
}
else // prevents WeakReference from marking its reference as used
if (c == weakReferenceClass)
if (c == weakReferenceClass || isSuperClass(c, weakReferenceClass))
{
if (FIELD_OBJ(o, OBJ_CLASS(o), 0) != NULL) {
int32 size,idx;
Expand Down

0 comments on commit b9e5a7c

Please sign in to comment.