DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36293>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36293 ------- Additional Comments From [EMAIL PROTECTED] 2005-08-22 23:01 ------- Shankar, >From the Javadoc: "Virtual machine implementations are, however, encouraged to bias against clearing recently-created or recently-used soft references." and "Thus a sophisticated cache can, for example, prevent its most recently used entries from being discarded by keeping strong referents to those entries, leaving the remaining entries to be discarded at the discretion of the garbage collector." Memory has to come from somewhere. There is absolutely nothing wrong with resource cache entries being removed by GC if it just so happens that these references are used less often than others in the pool. I understand your concerns, but I think we can all agree on the following use-case: if a large image resource has not been accessed in over 12 hours, it makes perfect sense to allow it to be garbage collected. If you really want to guarantee that resources will remain cached for a minimum of X minutes, simply maintain a hard reference to them and after X minutes remove the hard reference leaving only SoftReferences in place. I've used this many times in my own code and it works beautifully. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]