Aaah - I didn't understand that connection. The easy approach here would be to let Perl do all your reference counting.
Make the person a hash entry in your (Perl) Person class, and have ->get_person also store the (Perl) Record object in the Person hash. This is most easy done on the Perl side.
This way, as long as the Person is alive, the Record object belonging to the Person is also alive. The person data structure will then also stay valid through the Record object.
In reply to Re^3: Managing C library memory in XS
by Corion
in thread Managing C library memory in XS
by petermogensen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |