shogun
shogun copied to clipboard
C# SGMatrix and SGVectorList typemaps leak memory
In the out typemaps for both SGMatrix and std::vector<SGVector>, memory is allocated using malloc, but it's not freed.
https://github.com/shogun-toolbox/shogun/blob/c948611b1e075b731d92c109d22abe79279b0a77/src/interfaces/csharp/swig_typemaps.i#L37-L53
https://github.com/shogun-toolbox/shogun/blob/c948611b1e075b731d92c109d22abe79279b0a77/src/interfaces/csharp/swig_typemaps.i#L231-L256
These allocated buffers are passed to C# code as IntPtr, and can't be deallocated from there.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have a simple solution in mind. I will attend to this issue this weekend.
No rush! I just added this bot to clean up the repo