I try to instantiate my class A (its goal is to notify other classes observers by a result ) into class B and after adding the observers the class A call its destructor and delete these observers . What I want is to instantiate my class A into class B without invoking the destructor. I think about a handler class which will be singleton but nothing is clear in my mind. Please help me. I code with c++.
Aucun commentaire:
Enregistrer un commentaire