mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 20:59:08 -04:00
refactor: use libgit free() functions instead of calloc()
This commit is contained in:
parent
4f851bc2e5
commit
2477b4efd8
14 changed files with 30 additions and 21 deletions
|
@ -284,3 +284,6 @@ void deleteMultivar(
|
|||
calloc.free(name);
|
||||
calloc.free(regexpC);
|
||||
}
|
||||
|
||||
/// Free the configuration and its associated memory and files.
|
||||
void free(Pointer<git_config> cfg) => libgit2.git_config_free(cfg);
|
||||
|
|
|
@ -215,3 +215,6 @@ bool isValidName(String name) {
|
|||
calloc.free(refname);
|
||||
return result == 1 ? true : false;
|
||||
}
|
||||
|
||||
/// Free the given reference.
|
||||
void free(Pointer<git_reference> ref) => libgit2.git_reference_free(ref);
|
||||
|
|
|
@ -446,3 +446,6 @@ Pointer<Pointer<git_object>> revParseSingle(
|
|||
|
||||
return out;
|
||||
}
|
||||
|
||||
/// Free a previously allocated repository.
|
||||
void free(Pointer<git_repository> repo) => libgit2.git_repository_free(repo);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue