I have the following:
class B
listens to a boost::signal2
of class C
and when triggered will execute a callback given by class A
and that executes a method in class A
A
, B
and C
, D
are all std::shared_ptr
.
The problem is that when class D
releases the pointer to class B
, B
is not being deleted because of the signal handler. Even if I call disconnect on the boost::connection
I have the same problem.
Any Idea how I can fix that ?