FFI Memory Management

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FFI Memory Management

Ron Teitelbaum

Hello All,

 

I was just cleaning up after FFI when I noticed that there were external addresses still allocated.  Looking at the method Parser >> externalFunctionDeclaration it appears that the issue is ExternalLibraryFunction instances with live handles created by the parser.  Is there a particular way that I should go about cleaning this up, or should I run through and find my own instance and free them?

 

Thanks for your help!

 

Ron Teitelbaum  



Reply | Threaded
Open this post in threaded view
|

Re: FFI Memory Management

Andreas.Raab
> I was just cleaning up after FFI when I noticed that there were external
> addresses still allocated.  Looking at the method Parser >>
> externalFunctionDeclaration it appears that the issue is
> ExternalLibraryFunction instances with live handles created by the
> parser.  Is there a particular way that I should go about cleaning this
> up, or should I run through and find my own instance and free them?

No you shouldn't. ExternalFunctions can't be "freed" that way since
their handle do not signify allocated memory but rather the address of
the function itself. Note that all ExternalAddresses get cleared upon
system startup anyway (e.g., reset to NULL) so there isn't anything you
need to do.

Cheers,
   - Andreas