You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have committed this issue in coreclr repo, but they told me to commit here. https://github.com/dotnet/coreclr/issues/756
Current weak reference is class, when we use it, we must alloc slots from short or long weak reference table. Thus we can't use too many weak references. But I think this is not necessary. When GC happens, CLR can update strong references of living objects after compaction, why not update weak references of freed objects to be null at the same time? So weak reference can be a language feature instead of class, for example, use keyword "weakref" to specify a variable to store weak reference of an object.
Example:
Class A
{
weakref int[] a;
weakref object b;
};
The text was updated successfully, but these errors were encountered:
I have committed this issue in coreclr repo, but they told me to commit here. https://github.com/dotnet/coreclr/issues/756
Current weak reference is class, when we use it, we must alloc slots from short or long weak reference table. Thus we can't use too many weak references. But I think this is not necessary. When GC happens, CLR can update strong references of living objects after compaction, why not update weak references of freed objects to be null at the same time? So weak reference can be a language feature instead of class, for example, use keyword "weakref" to specify a variable to store weak reference of an object.
Example:
Class A
{
weakref int[] a;
weakref object b;
};
The text was updated successfully, but these errors were encountered: