Hi,<br><br>I am experimenting ac++ (version 1.0pre3) with ACDT in eclipse. I declared my aspect as following, however, the advice on the pointcut doesn't seem to work at all. Any clue to solve the problem is appreciated.<br>
<br>** aspect:<br>#include <iostream><br>using namespace std;<br>aspect myAspect {<br> pointcut locked () = execution ("% ...::operator new(...)") || <br> execution ("% ...::operator new[](...)") ||
<br> execution ("% ...::operator delete(...)") || <br> execution ("% ...::operator delete[](...)");<br> <br> advice locked () : after ()
<br> {<br> cout << "new or delete operator executed" << endl;<br> } <br>};<br><br>** c++ code<br>#include <iostream><br>#include <stdlib.h><br>#include <cmath><br><br>
using namespace std;<br><br>class A {};<br><br>int main () {<br><br> int* pInt = new int;<br> A* pA = new A;<br><br> delete pInt;<br> pInt = 0;<br> delete pA;<br> pA = 0;<br> <br> return 0;<br>}<br>
<br>Thanks!<br><br>Terry<br>