Yeah Object>>#finalize is supposed to do what you said but unfortunately it does not work...
Maybe it's a VM bug or maybe it's not supported any more. We'll see if Eliot answer the thread. 2015-01-13 15:55 GMT+01:00 Johan Fabry <jfa...@dcc.uchile.cl>: > > No, just putting the cleanup code in a finalize method does not seem to be > working, sadly. > > > On Jan 13, 2015, at 11:18, Sven Van Caekenberghe <s...@stfx.eu> wrote: > > > > Object>>#finalize ? > > > >> On 13 Jan 2015, at 15:13, Johan Fabry <jfa...@dcc.uchile.cl> wrote: > >> > >> Hi all, > >> > >> does anybody here have experience with hooking into the GC mechanism so > that an object gets notified when it is collected? I have a setup here with > auto generated classes that I would like to remove when their unique > instance disappears. So I’d like to let the GC figure out all the > complicated tracking and inform me whenever such an object is collected, > then I’ll zap the class as well. > >> > >> Experience reports, hints and tips are most welcome! > >> > >> ---> Save our in-boxes! http://emailcharter.org <--- > >> > >> Johan Fabry - http://pleiad.cl/~jfabry > >> PLEIAD lab - Computer Science Department (DCC) - University of Chile > >> > >> > > > > > > > > > > ---> Save our in-boxes! http://emailcharter.org <--- > > Johan Fabry - http://pleiad.cl/~jfabry > PLEIAD lab - Computer Science Department (DCC) - University of Chile > > >