Add support for mempack #448
|
@ -34,6 +34,7 @@ func NewMempack(odb *Odb) (mempack *Mempack, err error) {
|
|||
|
||||
}
|
||||
|
||||
ret = C.git_odb_add_backend(odb.ptr, mempack.ptr, C.int(999))
|
||||
runtime.KeepAlive(odb)
|
||||
![]() This still needs to actually free the mempack, not just unset the finalizer. This still needs to actually free the mempack, not just unset the finalizer.
![]() We only need to lock the thread if we're going to deal with errors. We only need to lock the thread if we're going to deal with errors.
![]() The free should happen inside The free should happen inside `Mempack.Free`.
![]() Removed Removed
![]() Removed Removed
![]() Removed. Removed.
|
||||
if ret < 0 {
|
||||
// Since git_odb_add_alternate() takes ownership of the ODB backend, the
|
||||
// only case in which we free the mempack's memory is if it fails to be
|
||||
|
|
|||
![]() This still needs to actually free the mempack, not just unset the finalizer. This still needs to actually free the mempack, not just unset the finalizer.
![]() This still needs to actually free the mempack, not just unset the finalizer. This still needs to actually free the mempack, not just unset the finalizer.
![]() We only need to lock the thread if we're going to deal with errors. We only need to lock the thread if we're going to deal with errors.
![]() We only need to lock the thread if we're going to deal with errors. We only need to lock the thread if we're going to deal with errors.
![]() The free should happen inside The free should happen inside `Mempack.Free`.
![]() The free should happen inside The free should happen inside `Mempack.Free`.
![]() Removed Removed
![]() Removed Removed
![]() Removed Removed
![]() Removed Removed
![]() Removed. Removed.
![]() Removed. Removed.
|
Loading…
Reference in New Issue
This still needs to actually free the mempack, not just unset the finalizer.
This still needs to actually free the mempack, not just unset the finalizer.
We only need to lock the thread if we're going to deal with errors.
We only need to lock the thread if we're going to deal with errors.
The free should happen inside
Mempack.Free
.The free should happen inside
Mempack.Free
.Removed
Removed
Removed
Removed
Removed.
Removed.