S
sachin
Hi All
I have written a perl extension for a library mymodule I have used
swig to genarate this .
In this module there is a function get_prop which has one in
parameter and two out parameter
sub get_obj_prop {
($ret,$prop,) =&mymodule::get_prop($obj);
if($ret==$mymodule::MY_EOK) {
print "OK \n";
}
else {
print "Error $ret \n";
}
}
all variables have a global scope
$prop is a pointer to struct obj_prop
$prop is a pointer to a structure allocated by the library
when i call this function second time or i assign some other prop
structure pointer like
$prop = $prop1;
the perl internally calls
the delete_obj_prop function which deletes the structure pointed by
$prop
I dont want such thing to happen because the library internally takes
care of the allocated memory the library maintains the cache of the
allocated memory
Is there is any way so that i can prevent perl from freeing the
structure
Thanks in advance
Sachin.
I have written a perl extension for a library mymodule I have used
swig to genarate this .
In this module there is a function get_prop which has one in
parameter and two out parameter
sub get_obj_prop {
($ret,$prop,) =&mymodule::get_prop($obj);
if($ret==$mymodule::MY_EOK) {
print "OK \n";
}
else {
print "Error $ret \n";
}
}
all variables have a global scope
$prop is a pointer to struct obj_prop
$prop is a pointer to a structure allocated by the library
when i call this function second time or i assign some other prop
structure pointer like
$prop = $prop1;
the perl internally calls
the delete_obj_prop function which deletes the structure pointed by
$prop
I dont want such thing to happen because the library internally takes
care of the allocated memory the library maintains the cache of the
allocated memory
Is there is any way so that i can prevent perl from freeing the
structure
Thanks in advance
Sachin.