You could probably build one on your own via testing a weak reference in an if-pointcut. However, you would need to poll this reference over and over again. I don't think there's any way to have the garbage collector call you when an object is GC'ed. Having said that, you *could* probably attach an advice to the finalize() method, but as the documentation says, finalizers are not guaranteed to be run, or if they are run you get no guarantee about when or in which order. They may even run in parallel, if I remember correctly.
Eric On 11/11/2007, Jean-Louis.Pasturel <[EMAIL PROTECTED]> wrote: > Hi, > Is there a "magic" pointcut for detecting when an object : > - is finalized or this object is no more referenced ( object=null ;) ? > - is garbagged ? > > > Is-it only possible with AspectJ ? > > Best Regards > Jean-Louis > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > -- Eric Bodden Sable Research Group McGill University, Montréal, Canada _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
