Boost logo

Boost Users :

Subject: [Boost-users] shared pointer problem - can't destruct
From: Christopher Pisz (cpisz_at_[hidden])
Date: 2011-10-05 13:25:58


I've gotten myself into a situation.

I've got a class A that created class Bs
class B needs to register callbacks to the class A that created it.
So I made member variables in class B that are boost::function type
class A binds the method to be called and hands that to class B on construction

So, not class A always has a reference count and cannot be destoryed.

I tried passing a weak_ptr to boost::bind instead and it won't compile.

what to do?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net