in reply to Re^2: Managing C library memory in XS
in thread Managing C library memory in XS
Ok. You didn't mention there was deep nesting.
Somewhat less "hacky" than relying on the NV slot to not get overwritten by Perl, could you you live with an extra layer of indirection? That is, each time you get an unfree-able pointer, allocate a control structure to point to the unfree-able structure. This control structure would also have a field to hold the pointer you were going to put in the NV slot (plus any other fields you might need).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Managing C library memory in XS
by petermogensen (Sexton) on May 06, 2014 at 05:59 UTC | |
by RonW (Parson) on May 06, 2014 at 16:32 UTC | |
by petermogensen (Sexton) on May 06, 2014 at 19:21 UTC |