[C++-sig] weak_ptr to this in C++ classes extended from python
dave at boostpro.com
Fri Apr 27 15:49:39 CEST 2012
on Fri Apr 27 2012, Holger Brandsmeier <brandsmeier-AT-gmx.de> wrote:
> On Mon, Apr 23, 2012 at 20:48, Holger Brandsmeier <brandsmeier at gmx.de> wrote:
>> In the meantime I figured out a different way of doing the shared
>> pointer from this in python. Namely, to just make getThisRCP() a
>> virtual function, add it to the Wrapper and to implement it in the
>> python by implementing it as
> but I still expect the above mentioned approch with
> `boost::enable_shared_from_this` _should_ have worked with boost
> python. I seem to run into an issue that even Dave can not explain
> (well lets wait for his reply).
Unfortunately I don't have the time to do the analysis right now, but I
agree with you that it should have worked.
More information about the Cplusplus-sig