-
Notifications
You must be signed in to change notification settings - Fork 903
Prevent the git_trace callback from being garbage collected #917
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
Prevent the git_trace callback from being garbage collected #917
Conversation
This is way better, thanks! |
@jeffhostetler Neat! Few things though:
|
Sorry, I pushed that from my office machine. I've added that email address to my account. I've rebased and reworded the commit as suggested. Thanks for the feedback. |
/// | ||
/// Since the given callback will be passed into and retained by C code, | ||
/// it is very important that you pass an actual delegate here (and don't | ||
/// the compiler create/cast a temporary one for you). Furthermore, you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and don't [let] the compiler...?
@jeffhostetler Thanks a lot ✨ As you're at ease with rebasing, could you please rebase onto the latest vNext once @jamill's comment is fixed? |
Fixed. Thanks. |
Awesome. Just a minor warning from the build log:
|
Sorry about that. Got it. |
…ference2 Prevent the git_trace callback from being garbage collected
✨ ✨ ✨ ✨ ✨ ✨ |
Here is a better fix for the problem with the git_trace_cb being GC'd.
Thanks to @jamill for the suggestion that the call in GlobalSettings to Proxy.git_trace_set() might be secretly creating a temporary delegate for the GitTraceHandler method.