[Gdal-dev] Re: Memory leak under Matlab (a follow up from - importFromWkt() problem)

Joaquim Luis jluis at ualg.pt
Mon Sep 4 12:50:40 EDT 2006


Mateusz,
> May be you're using mexMakeMemoryPersistent in loop or similar call,
> so memory is not cleared after your MEX is unloaded.
>   
Sorry, I forgot to comment this.
MEXs are never unloaded (unless we issue a 'clear' command) so, for 
example, global variables
retains their values between successive mex calls.
This is a comprehensible behavior since loading a mex takes some time 
and imagine how slow
a loop would be if  inside it the dll had to loaded in every loop step.

Does this ring any bells for anything that are normally cleared by the 
system at the execution end
but will not be done here?

Joaquim




More information about the Gdal-dev mailing list