A
Alex Fenton
Hi
In a C extension, you can unset the 'free' function that will be called
when an object is garbage collected with something like:
RDATA(obj)->dfree = 0;
This is useful if you know that whatever C library you're interfacing to
will take care of free-ing the C structure.
Is the same thing is possible with an in-built ruby String object, to
set it so that the underlying char* contents will not be freed when the
String is GC'd?
thanks
alex
In a C extension, you can unset the 'free' function that will be called
when an object is garbage collected with something like:
RDATA(obj)->dfree = 0;
This is useful if you know that whatever C library you're interfacing to
will take care of free-ing the C structure.
Is the same thing is possible with an in-built ruby String object, to
set it so that the underlying char* contents will not be freed when the
String is GC'd?
thanks
alex