I am having some problems with memory management with using a C library. The
library has basically 1 function that I use. The function is foo( char*
input, char** output). The problem is that output seems to not be freed by
the perl xs module, and I get scripts that grow to 50+MBs very quickly.
Any ideas on how I can free the memory that this library is allocating?
A sample perl function that I have using it looks like:
sub Function()
my( $inputString, $outputString );l
$inputString = "some semi-long string of about 1k";
foo( $inputString, $outputString );
processString( $outputString );
return 1;
TIA,
Jerry