You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by Robin Sharma <pr...@yahoo.com> on 2005/10/27 00:33:25 UTC
Garbage collection of cache key object's parent.
Hi,
If the key I used to cache is an object that is a
member of another object, say A. Is A prevented from
being garbage collected?
Code Example:
MyObject o = new MyObject();
JCS.getInstance().put(o.getSomeObject(),someOtherObject);
My question is, will o is not garbage collected
because there is a ref to its member?
What are the guidelines? Should we clone the key
object if we want to free the object for Garbage
collection?
Will JCS clone keys internally?
Any insight will be appreciated.
Thanks,
Robin
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org