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
{{ message }}
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.
Since pointerVal is only called by Object.Set, and I think the memory handling for other types is incorrect as well, I think that whole function body should be moved into Object.Set.
The other memory problem here is that while returning an unsafe.Pointer does cause the pointed to Go value to escape to heap, the value is never freed if it is passed to a C function as a void * and is not type converted back to a Go pointer. So while the other types don't cause undefined behavior like strings do here, they are still memory leaks.
I was browsing through the code today and noticed something that looked odd:
Won't this create a unsafe memory access?
The text was updated successfully, but these errors were encountered: