Skip to content

[master] Prevent slot int variable from being GCed. #231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2015
Merged

[master] Prevent slot int variable from being GCed. #231

merged 1 commit into from
Jul 28, 2015

Conversation

dmitshur
Copy link
Contributor

This is a backport of the fix for next branch (PR #219) to master branch.

Fixes #218 completely.

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.
carlosmn added a commit that referenced this pull request Jul 28, 2015
…issue

[master] Prevent slot int variable from being GCed.
@carlosmn carlosmn merged commit f2d8797 into libgit2:master Jul 28, 2015
@dmitshur dmitshur deleted the master-fix-HandleList-Track-gc-issue branch July 28, 2015 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants