Memory leak when using CString? #214

Closed
opened 2015-06-19 02:15:28 -05:00 by shinningstar · 1 comment
shinningstar commented 2015-06-19 02:15:28 -05:00 (Migrated from github.com)

@carlosmn
When converting Go string to C char* using C.CString(), we have to free memory allocated by C side. But I found some codes don't do C.free(), for example:
https://github.com/libgit2/git2go/blob/master/branch.go#L96

I think that is memory leak here.

@carlosmn When converting Go string to C char\* using C.CString(), we have to free memory allocated by C side. But I found some codes don't do C.free(), for example: https://github.com/libgit2/git2go/blob/master/branch.go#L96 I think that is memory leak here.
carlosmn commented 2015-06-19 03:28:45 -05:00 (Migrated from github.com)

Yes, that's right.

Yes, that's right.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#214
No description provided.