From: Panayotis K. <pan...@pa...> - 2009-10-10 21:32:04
|
On 10 Οκτ 2009, at 11:54 μ.μ., Wolfgang Korn wrote: > We make use of reference counting and the autorelease pool mechanism > offered by Cocoa. Since reference counting is not as powerful as a > full-fledged garbage collector there is a limitation with this > approach: > Using reference counting does not clean up unreferenced circular data > structures, what a garbage collector of course would do. So you have > to > be a little bit careful to avoid this - otherwise the cross compiled > application would have a memory leak. I've seen here http://www.cokeandcode.com/XMLVM-OpenGL-Support-Patch-Commited which talks about annotations. I looked at the source code and I saw this, in file XMLVMNoAutoReleasePool.java @Retention(RetentionPolicy.CLASS) so, is there any way to "optimize" GC with annotations? And, one more thing, is there a way to force send an object to oblivion, e.g. when we have cycle dependencies like the one mentioned above (and I just want to free some memory) ? |