You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I am building GMT with DEBUG and MEM_DEBUG I get messages upon module exit if there were memory leaks. WHen I quit MATLAB after testing gmtmex I may get many of these, probably one for each module call:
Matlab [WARNING]: Memory not freed first allocated in gmt_api.c:12781(GMT_Encode_Options) (ID = 141): 0.141 kb [144 bytes]
The problem is that gmtmex.c does not bother to free the info structure array returned by GMT_Encode_Options. OK, so two issues:
That array is allocated with GMT_memory and thus is tracked by GMT's garbage man
The API has no way of calling GMT_free since all it has is GMT_Destroy_Data which would not work on some random array.
I think the solution is:
Let GMT_Encode_Options allocate directly with malloc/realloc and not GMT_memory
Description of the problem
Since I am building GMT with DEBUG and MEM_DEBUG I get messages upon module exit if there were memory leaks. WHen I quit MATLAB after testing gmtmex I may get many of these, probably one for each module call:
Matlab [WARNING]: Memory not freed first allocated in gmt_api.c:12781(GMT_Encode_Options) (ID = 141): 0.141 kb [144 bytes]
The problem is that gmtmex.c does not bother to free the info structure array returned by GMT_Encode_Options. OK, so two issues:
I think the solution is:
OK with you @joa-quim ?
The text was updated successfully, but these errors were encountered: