Quote:
Originally posted by Zaei
I doubt it, but it will be removed when the constructor exits. You could also declare _aa as an aa*, and use "new" in the constructor for ab (ie, _aa = new aa(1, 2)), then delete _aa in ab's destructor.
Z.
I wouldn't go for any freaky solutions :) A pointer would be plain painful overhead. I was rather wondering if the local variable had to be instantiated at all but instead assign aa immediately. I know the compiler tries to use the registrers as efficient as possible, but I have no guarantee.