Java 8 lambdas and the GC - Objection
Ok, so I was playing with WeakReferences in java (as you do) and had written some code where you could add lots of listeners/subscribers/whatever to this …well publisher I guess. There would be only one publisher, but potentially lots of subscribers, so I figured I'd try wrapping the listeners in WeakReferences, so I wouldn't have to worry about having to match each addListener() call with a removeListener() to avoid a potential memory leak.
Read full article from Java 8 lambdas and the GC - Objection
No comments:
Post a Comment