Closed meebey closed 11 years ago
Good, I was going to report this one myself, it might be worth checking around for others as the C API allocates memory for most return calls.
FTR, FreeHGlobal
fails (which gave the other issue) because this cannot free memory allocated by malloc
from the CRT, as Windows seems to have four or five different ways of allocating memory.
All it takes is a call to 'free', which is exported by the wrapper as leveldb_free
I haven't find it because I fear there are others and I'd end up looking and checking them all
On Thursday, March 21, 2013, Carlos Martín Nieto wrote:
FTR, FreeHGlobal fails (which gave the other issue) because this cannot free memory allocated by malloc from the CRT, as Windows seems to have four or five different ways of allocating memory.
— Reply to this email directly or view it on GitHubhttps://github.com/meebey/leveldb-sharp/issues/2#issuecomment-15220236 .
See the PR
Sorry, on my phone - all I have is my email :) :)
On Thursday, March 21, 2013, Carlos Martín Nieto wrote:
See the PR
— Reply to this email directly or view it on GitHubhttps://github.com/meebey/leveldb-sharp/issues/2#issuecomment-15220627 .
Roman Polunin wrote:
1) in your mapping of leveldb_get you perform Marshal.PtrToStringAnsi on the buffer returned from leveldb; however, you do not call leveldb_free on that buffer. This looks like a memory leak. ...