WeakReference and WeakEventManager (listener)
Both are perfect as long as you understand the concept.
Essentially, whilst instances of the Weak classes can be rooted, their contents cannot.
For example:
Something that naughtily references the object inside WeakReference may magically lose this reference once it get's GC'd.
Any subscribers to events attached via the WeakEventManager class will GC'd once the underlying instance of the WeakEventManager is GC'd.
Comments
Post a Comment