[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-dev] Cflow context exposure and hard references
- From: "Wes Isberg" <wes@xxxxxxxxxxxxxx>
- Date: Wed, 3 Aug 2005 11:56:02 -0700
- Delivered-to: email@example.com
Hi Eric -
You're suggesting that an executing object (target) in the current stack would be garbage collected?
I'm not sure a reference obtained via this, target, or args would ever be garbage collected absent cflow. (I believe the operand stack is the same even when arguments are unused, but couldn't find anything on point.)
The programmer can create memory leaks using advice, but I don't think ajc does here.
> ------------Original Message------------
> From: Eric Bodden <eric@xxxxxxxxx>
> To: "'AspectJ developer discussions'" <aspectj-dev@xxxxxxxxxxx>
> Cc: "Laurie Hendren" <hendren@xxxxxxxxxxxxxxx>, "Oege de Moor" <Oege.de.Moor@xxxxxxxxxxxxxxx>
> Date: Tue, Aug-2-2005 8:48 AM
> Subject: [aspectj-dev] Cflow context exposure and hard references
> I have a quick question about context exposed by cflow pointcuts.
> Take e.g. the following definition:
> pointcut pc(B b): call(* A.foo()) && cflow(execution(* B.bar()) &&
> Here pc exposes b from the control flow. This means that internally b
> push a reference to b on the cflow stack. My question is: I this a hard
> reference or not?
> In the case that it is hard, this means that b is not being garbage
> collected. This means there can be chances that it usually *were*
> collected but now it is not, because the stack is still referencing the
> object. This again means that the advice could access an object which
> actually dead in all other aspects (including the core concern).
> In the case that it is weak/soft this means that it is not prevented
> being garbage collected, however this could mean that at the moment you
> to execute, an advie attached to pc, it could be the case that b is
> (which should maybe prevent the advice from being executed in the first
> So what are the current semantics?
> Eric Bodden
> RWTH Aachen University
> ICQ UIN: 12656220, Skype: ericbodden, PGP: BB465582
> Website: http://www.bodden.de
> aspectj-dev mailing list