KeepAlive all the things #393
Loading…
Reference in New Issue
No description provided.
Delete Branch "cmn/keepalive-all-the-things"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Newer Go runtimes' GC is particularly eager and doesn't even consider the receiver as a reference. Thus in order for structs wrapping the pointers not to be freed while in the middle of us using them in a function call, we must make sure that the wrapping struct is kept alive until after we return from.
This seems to be the cause of #352, #334 and #356 and this should fix the other places where this might happen.
@carlosmn thank you for working on this, for all the work and maintaining git2go!
I am checking in, having been paged in by @josharian who is currently on leave and away from his computer. By
Newer Go runtimes' GC
what would the older version be? I ask because the spread of versions in the closed issues is diverse, ranging from Go1.6 to Go1.8Beta1AFAICT it was Go 1.6 which introduced the more eager garbage collector, but each version brings its own GC changes.