Skip to content

Simplify git_revparse_ext usage#1013

Closed
nulltoken wants to merge 1 commit into
vNextfrom
ntk/revparse
Closed

Simplify git_revparse_ext usage#1013
nulltoken wants to merge 1 commit into
vNextfrom
ntk/revparse

Conversation

@nulltoken

Copy link
Copy Markdown
Member

No description provided.

@nulltoken

Copy link
Copy Markdown
Member Author

@jamill What's your opinion about this?

@nulltoken nulltoken added this to the v0.22 milestone Apr 14, 2015

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call GC.SuppressFinalize() at the end of this method?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Indeed. Thanks for this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think I was mistaken here - I don't think this is needed.

From Object.Finalize documentation:

The Object class provides no implementation for the Finalize method, and the garbage collector does not mark types derived from Object for finalization unless they override the Finalize method.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@jamill

jamill commented Apr 15, 2015

Copy link
Copy Markdown
Member

DisposableTuple feels a bit awkward to me - it is kindof a general construct, but is tailored to a specific use case here. What would you think about just creating a private class that encapsulates the return value of git_revparse_ext and has 2 specific members with friendly names?

@nulltoken

Copy link
Copy Markdown
Member Author

What would you think about just creating a private class that encapsulates the return value of git_revparse_ext and has 2 specific members with friendly names?

I'll try this out and report back when it's done.

@bording bording closed this Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants