[C++-sig] Re: class callback

Leo Yee surffirst at yahoo.com
Wed Jan 28 08:19:04 CET 2004


Hi, Nicodemus,

I missed some code here. What I want is to delete the object that hold the
_cHolder object. I found that I can't delete it since _cHolder object hold a
class method of that object. So I wonder if there is a method to solve this
problem.

I am reading the articel you recommend to me. I think it is helpful.

Thank you.

Leo Yee

"Nicodemus" <nicodemus at esss.com.br> ????
news:4013D729.5050000 at esss.com.br...
> Leo Yee wrote:
>
> >Hi,
> >
> >I am coding c++ object which gives callback functions to python. I
> >encountered these problem that a c++ object destruction method won't be
> >called if a python class holds the c++ object that has a callback
function
> >of this python class.
> >
> >Let's look the code.
> >
> ><snip>
> >
> >
>
>
> Perhaps this recipe can help you:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81253
>
> But I don't understand why did you expect the _cHolder object to be
> destroyed, since a reference to it is still held in the a object...
>
> Regards,
> Nicodemus.







More information about the Cplusplus-sig mailing list