Eike Stepper wrote:
"Stephen McConnell" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED]
Eike Stepper wrote:
i solved it:
i did the registration of the component from within the component code so that the registry had a handle to the component. now i do the registration from outside and a handle to the proxy is stored in the map and abracadabra: the proxy is no longer garbage collected ;-)))
Was about to suggest this - basically the container cannot hold a hard reference to a transient component because this would result in a direct memory leak. Transients are a special case that default to a non-hard collection policy. As you discovered - if you maintain a reference to the component then the component will not be garbage collected.
such kind of special treatment should really be mentioned in the docs ;-)
What! And take away the sense of adventure!
;-)
I've just posted the content of your email to RUNTIME-33 "Document the collection policy for transient components". I probably will not get to it for a while so don't hesitate to post a patch if you get the chance. In the meantime I'm busy working on completing a total build of the runtime platform using ant (am currently playing with a alternative approach to component testing using a merlin test suite handler).
Cheers, Steve.
--
|---------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org | |---------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]