[aspectc-user] reset tjp->that()?

Yan Mao maoyan at gmx.net
Fri Dec 8 10:52:27 CET 2006


Hello,

thanks for the answer

> Here tjp->that() gives you what ever 'this' points to at the join point.
> After the weave your code would be in effect the following (the actual
> code given to C++ compiler is much more complicated, but this is how it's
> semantics are):
> 
> ClassA *p = new ClassA();
> p->DoSomething();
> p->Release();
> this=NULL;

A good Point, I didnt know this.
 
> This can not work. However, you can get 'p' by doing tjp->that()->p. To my
> knowledge there's one requirement for this to work, though. Your 'p' can
> not
> be a function/method local variable. 

So u mean 'p' should be a class data member? But no, my 'p' is a local variable. so I cant use tjp->that()->p to access it.

regards

Yan Mao
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



More information about the aspectc-user mailing list