in reply to Re: C++ object & PERL garbage collection
in thread C++ object & PERL garbage collection

I'm wondering whether the object isn't being constructed and blessed in C++ using XS. If that's the case then I guess I could see how this might be happening. I still really want to see the code to understand what kind of brokenness is occurring here.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^2: C++ object & PERL garbage collection

Replies are listed 'Best First'.
Re^3: C++ object & PERL garbage collection
by Anonymous Monk on Sep 23, 2006 at 01:22 UTC

    1) we use SWIG, not XS the C++ object is a PERL HASH i can invokes methods on the object with OBJ->method() just like a PERL object! :-)

    exactly what code do you want to see?
    i sort of feel that this is a "philosophical" issue and not a "coding" mistake
    in another reply, i pointed out that OUR works.
    based on my limited understanding of OUR;
    it seems that OUR prevents PERL from deleting the C++ Object when its being passed around.
    but the OUR declaration has to be global