Thursday, December 11, 2003, 5:04:59 PM, Stephen McConnell wrote: > Daniel Dekany wrote: [snip] >>tutorial *.java-s showed that it was never used. This may does not mater >>to much for singletons (unless I want component expiration), but if the >>service happens to be implemented as "transient", it leaks memory with >>each lookup() call, >> > > Fear not! > Merlin will auto-decommission the object. > >>as the object will not be released until merlin >>shuts down if I don't call release(obj)... >> > > Merlin does not maintain hard references to components which means that > objects can be gargage collected but merlin will intercept this process > to handle the proper decommissioning of the actual component (i.e. > dispose - etc.).
Exactly when does it store hard reference, and when not? For example: I have a "transient" component (not declared in block.xml), and I request (lookup) that for multiple times. I'm sure I don't store references to them, still they are not disposed until Merlin shut-down (unless I have explicitly release() them). OK, GC is not deterministic, but as a test, I have called gc() periodically for 20 seconds, and there is minimal chance in practice that they were not gc-ed if they were not referenced. -- Best regards, Daniel Dekany --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
