Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ITD based on annotations



> garbage collection for Aspects, when using the pertypewithin

The aspect can be garbage-collected when the corresponding Class can be,
regardless of the number of instances of that class.

hth - Wes

I may be wrong about this, but afaik a class is available for garbage collection only if its classloader is available for gc.  Probably a good example would be a webapp in a servlet container: only upon redeploy the classes in the prev deploy become available for gc.

hth,

./alex
--
.w( the_mindstorm )p.


> ------------Original Message------------
> From: Paulo Alexandre Corigo Zenida <paulo.zenida@xxxxxxxx>
> To: "AspectJ Mailling List" <aspectj-users@xxxxxxxxxxx >
> Date: Wed, Mar-22-2006 1:17 PM
> Subject: [aspectj-users] ITD based on annotations
>
> Hello,
>
> Currently, in order to do ITD based on annotations, we have to use
> interfaces, injecting code in the interface and not in the class
> itself, directly, like this:
>
> declare parents : (@MyAnnotation *) implements MyInterface;
>
> public void MyInterface.foo() { ... }
>
> So, it's not possible to do ITD based on an annotation type, in the
> class itself... Something like this:
>
> public void (@MyAnnotation *).foo() { ... }
>
> And I was just wondering if there is any particular reason for it. Can
> you help me, please? :)
>
> By the way, another issue, which is just a curiousity, is related to
> garbage collection for Aspects, when using the pertypewithin
> instantiation mechanism. So, with that kind of instantiation, we get a
> new instance of an aspect for each type, right? So, let us suppose we
> have an aspect that matches for a class called A and we create three
> instances of that class (creating only one instance of the aspect); and
>
> after a while, all those instances are garbage collected; what happens
> to the Aspect? Is it garbage collected too?
>
> Thanks for your interest.
>
> Cheers,
>
> Paulo Zenida
>
> ----------------------------------------------------------------
> Mensagem enviada usando o IMP (Internet Messaging Program).
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top