Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] perthis question

Hi, I have a doubt about the exact meaning of the perthis keyword. I have read the docs several times and I'm unable to clarify my question.

I understand that when the pointcut defined inside perthis is reached, then an aspect instance is created and associated with the current this object. If it already exists an aspect instance of the same class associated with that object then no new instance of the aspect is created. Is this OK?

My problem is that I don't know when the aspect instance is destroyed. Does anybody know it ? I have two ideas:

a) Is destroyed when the pointcut is not active again.
b) Is destroyed when the object is garbage collected.

Can anyone help me?

Enrique Amodeo



Back to the top