Re: [java-gnome-hackers] java-gnome memory management issues
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2008-08-26 11:29:41
|
On Tue, 2008-08-26 at 21:18 +1000, Vreixo Formoso wrote: > However, when the Entity is garbage collected, the release() method is > never called. So, immediately, the problem is that someone (ahem) forgot to put a finalize() placeholder in Entity. That's easily fixed. > ... > Obviously, if release() is defined in Proxy, a better design would be > having this piece of code there. > I think, however, that the code > > if (owner) { > release(); > owner = false; > } > super.finalize(); THAT can go into Proxy's finalize() placeholder [or rather, Pointer's]. Let's leave the actual release() method abstract there. AfC Sydney -- Andrew Frederick Cowie Operational Dynamics is an operations and engineering consultancy focusing on IT strategy, organizational architecture, systems review, and effective procedures for change management. We actively carry out research and development in these areas on behalf of our clients, and enable successful use of open source in their mission critical enterprises, worldwide. http://www.operationaldynamics.com/ Sydney New York Toronto London |