-
Notifications
You must be signed in to change notification settings - Fork 325
Closed
Description
The Object interface has a function called Free() which called libgit2 git_object_free(). Some test cases ( https://github.com/libgit2/git2go/blob/master/remote_test.go#L160) are using defer to call Free() function. However, in function allocObject, it has already used SetFinalizer to cal Free() function (https://github.com/libgit2/git2go/blob/master/object.go#L72).
So, I think the calling defer commit.Free() here is unnecessary, right?
Furthermore, when should I have to call Free() function explicitly?
Metadata
Metadata
Assignees
Labels
No labels