From: Panayotis K. <pan...@pa...> - 2010-03-23 23:12:22
|
On 23 Μαρ 2010, at 7:29 μ.μ., Panayotis Katsaloulis wrote: > Java will never stop surprise me! > I really didn't know that it supported weak references! > > Your idea is very good, I'll follow this path, then! > > -- > Panayotis > > 23 Μαρ 2010, 5:47 μ.μ., ο/η Tor Lillqvist <tm...@ik...> έγραψε: > >>> although I am not sure that this is something that should be >>> exposed in Java, but anyway. >> >> Java is supposed to have weak references, isn't it? >> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/WeakReference.html >> So if you expose them to Java as the spec describes, it should just >> be a good thing and make even more Java code work with XMLVM. >> >> --tml It seems that this was much easier than what I originally thought. In parallel I have created a mechanism to store variables of category objects (or any other object anyway), since by definition in a category you won't be able to store other variables. This is useful to clean up a bit with retained delegates that nobody releases them (and yes, I believe this code has less memory leaks than ever!) Probably I should take down my old patch and release a new patch, with this improved memory management issues. What others (i.e. the xmlvm team) think? :D |