A typical strategy is to package your C or C++ thing as a pointer and then make an object out of it. The key here is that perl objects are references so the thing they're pointing to is present as long as the object is. You really ought to post some of your code if you want better help.
<c>package Bar; sub new { my ( $class, $cpp_thing ) = @_; return bless \ $cpp_thing, $class; }</code>⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: C++ object & PERL garbage collection
by diotalevi
in thread C++ object & PERL garbage collection
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |