class A {
public :
A();
~A();
int f();
};

class B {
public :
A* a;

B();
~B();
const A* getA();
};

void main(void) {
B b ;
const A* a = b.getA() ;
delete a;
}

I have found a solution, using a third class C, having the same interface of A and a menber A*. The destructor of this class doesn’t delete the pointer and I have changed the class B which return an pointer on a class C.
I just want to know if there is an other solutions.

Bruno.