Do have a way to unregister the callback? When I was using a shared_ptr
originally, I was trying to use that, yet the objects still hung around. I
was thinking that I properly didn't completely unregister it from all
listeners, but I wonder now if I actually managed to cover all my tracks.
I'm w
Adam,
>> So, before the function exits your object `arg` exists at least in three
>> places:
>> 1) somewhere in C++ where it was created
>> 2) in the python context
>> 3) in the context of addCallback
>>
>
> Technically, it was declared and constructed from Python, but everything you
> say is a
On Tue, Mar 6, 2012 at 3:47 AM, Holger Brandsmeier wrote:
> Adam,
>
> You probably have a function like this
>
> void addCallback(share_ptr<> arg) {
> callbacks.push_back(weak_ptr<>(arg);
> }
>
>
That's pretty much what I have happening.
>
> So, before the function exits your object `arg` exists
Adam,
you probably run into a similar problem that I ran into (not with
boost::shared_ptr but with our custom implementation which strongly
mimics boost::shared_ptr). I wanted to have a class in C++ that is
extended in python, and it should store a weak_ptr to itself.
Unfortunately I didn't solve