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
When working in a garbage collected language sometimes it is nice to have a little bit more control over memory management a common prototype for this is WeakReferences basically references to objects that do not prevent the value from being freed.
I am thinking we have a simple WeakRef type with the operation getValue which will return an option depending on if the object has been freed or not already to maintain program safety.
Weak references have many use cases one such use case is for breaking cyclic chains in the gc which would otherwise fail to be collected.
The text was updated successfully, but these errors were encountered:
When working in a garbage collected language sometimes it is nice to have a little bit more control over memory management a common prototype for this is
WeakReferences
basically references to objects that do not prevent the value from being freed.I am thinking we have a simple
WeakRef
type with the operationgetValue
which will return an option depending on if the object has been freed or not already to maintain program safety.Weak references have many use cases one such use case is for breaking cyclic chains in the gc which would otherwise fail to be collected.
The text was updated successfully, but these errors were encountered: