We had a discussion about this early on, but I think that was before we
moved to apache, so the archives are probably gone.
The bottom line is that using weak references for listeners has nasty
corner cases.
For example, if we do
something.addListener(new Listener() {
});
and we use a weak reference, the anonymous inner class will get GC'ed at
some random point in time, even if the parent class is still alive.
Niclas Hedhman wrote:
> On Mon, Oct 26, 2009 at 9:58 PM, Todd Volkert <[email protected]> wrote:
>
>> since the
>> caller will leak memory without calling BeanMonitor.setSource(null).
>>
>
> Every now and then I see this (or similar) being mentioned, which is
> common in "event-driven" environments with a lot of listeners. Have
> you guys taken on and fully appreciate soft and weak references??
>
>
> Cheers
>