[next] Prevent slot int variable from being GCed. #219

Merged
dmitshur merged 1 commits from next-fix-HandleList-Track-gc-issue into next 2015-07-24 06:43:19 -05:00

1 Commits

Author SHA1 Message Date
Dmitri Shuralyov b5693c1429 Prevent slot int variable from being GCed.
Before this change, there were no users of slot int variable in the Go
world (just a pointer to it that ended up in C world only), so Go's
garbage collector would free it and its value could not retrieved later
(once a pointer to it comes back to Go world from C world).

Keep a pointer to it in the Go world so that does not happen.

Fixes #218.
2015-07-06 19:27:58 -07:00