Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

repository: make cleanup safe for re-use with grafts#6600

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 1 commit intomainfromcmn/clear-graft-pointers
Jul 18, 2023

Conversation

carlosmn
Copy link
Member

We are allowed to callgit_repository__cleanup multiple times, and this happens e.g. in rugged if we want to free up resources before GC gets around to them.

This means that we cannot leave dangling pointers in it, which we were doing with the grafts. Fix this by setting the pointers to NULL after freeing the resources.


I discovered this while working onlibgit2/rugged#964 trying to update the bindings.

We are allowed to call `git_repository__cleanup` multiple times, and thishappens e.g. in rugged if we want to free up resources before GC gets around tothem.This means that we cannot leave dangling pointers in it, which we were doingwith the grafts. Fix this by setting the pointers to NULL after freeing the resources.
@ethomsonethomson merged commit9903482 intomainJul 18, 2023
@ethomsonethomson deleted the cmn/clear-graft-pointers branchJuly 18, 2023 13:36
@ethomsonethomson mentioned this pull requestAug 2, 2023
@ethomsonethomson added the bug labelAug 14, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@carlosmn@ethomson

[8]ページ先頭

©2009-2025 Movatter.jp