refactor!: use Finalizer to automatically free allocated memory for objects

BREAKING CHANGE: signature change for remote and repository callbacks
during repository clone operation.
This commit is contained in:
Aleksey Kulikov 2022-04-21 14:07:11 +03:00
parent 94c40f9a94
commit b589097c8c
73 changed files with 1073 additions and 1618 deletions

View file

@ -74,9 +74,6 @@ class Merge {
(e) => analysisInt[1] == e.value,
);
head.free();
ref.free();
return <Object>[analysisSet, mergePreference];
}
@ -140,8 +137,6 @@ class Merge {
/// [fileFlags] is a combination of [GitMergeFileFlag] flags. Defaults to
/// [GitMergeFileFlag.defaults].
///
/// **IMPORTANT**: returned index should be freed to release allocated memory.
///
/// Throws a [LibGit2Error] if error occured.
static Index commits({
required Repository repo,
@ -188,8 +183,6 @@ class Merge {
/// [fileFlags] is a combination of [GitMergeFileFlag] flags. Defaults to
/// [GitMergeFileFlag.defaults].
///
/// **IMPORTANT**: returned index should be freed to release allocated memory.
///
/// Throws a [LibGit2Error] if error occured.
static Index trees({
required Repository repo,