C++ object must need to be freed manually, because Go doesn't track C++ object ownership.
Change the reference array of the slice header at the C++ level, but It is not enough to deallocate memory. Go garbage collector still doesn't know that object.
I added some typemap definition to release C++ object at the Go level.
dev
.Issue
I've seen memory increase due to n2.SearchByVector / n2.SearchById.
https://github.com/kakao/n2/blob/0fe339177e8a22566d6958f924f8f0c382aab00c/bindings/go/n2gomodule.i#L36-L46
C++ object must need to be freed manually, because Go doesn't track C++ object ownership. Change the reference array of the slice header at the C++ level, but It is not enough to deallocate memory. Go garbage collector still doesn't know that object.
I added some typemap definition to release C++ object at the Go level.
Result