Hello Bob!
At one point in time there was an implementation of the ModelEventPump that
used WeakReference to solve this problem. According to the javadoc comment
it should still be in place but I can't find the implementation. Maybe it
was not implemented that way when we moved to MDR and the comment has not
been removed.
The purpose of keeping the listeners with a WeakReference was to avoid
having to walk through all classes to unregister. I still think it is a good
idea so I wonder why it was removed. In any case it must be settled in one
way or the other before you do the change you suggest.
/Linus
2008/5/3, Bob Tarling <[EMAIL PROTECTED]>:
>
> I would like to do this but I don't think now is a good time to
> introduce such change. I'd be worried that panels maybe keeping hold
> of listeners and so doing something like this may introduce a memory
> leak.
>
> I'll create an issue that could be tackled at some later date.
>
> Bob.
>
>
> 2008/5/3 Linus Tolke <[EMAIL PROTECTED]>:
>
> > Caching these is a problem when it comes to reusing them when eventually
> > opening property panels for several different objects at the same time.
> >
> > I am not sure but I guess the gain is small so if there is any
> complexity
> > involved in managing the cache, I suggest we drop it and let the
> > constructors and garbage collector take care of this.
> >
> > /Linus
> >
> > 2008/5/2, Bob Tarling <[EMAIL PROTECTED]>:
> > >
> > >
> > >
> > > TabProps has a factory to create the propertypanels for model elements
> > > and for each keeps it creates it caches it so that we reuse the same
> > > instance next time around.
> > >
> > > Is it really worth our caching these?
> > >
> > > Do we really expect we are going to get some performance by not
> > > allowing these to be garbage collected even though we will have to
> > > rebuild the list model etc of each one when it is redisplayed anyway.
> > >
> > > Bob.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>