checkpoint
This commit is contained in:
@@ -12,12 +12,11 @@ namespace Foodsoft.Alpm
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[PrePrepareMethod]
|
||||
get;
|
||||
} = null!; // we always throw in the constructor on failure
|
||||
} = null!;
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
[PrePrepareMethod]
|
||||
internal SafeDatabaseHandle(IntPtr dbPtr, SafeAlpmHandle safeAlpmHandle)
|
||||
: base(IntPtr.Zero, true)
|
||||
internal SafeDatabaseHandle(IntPtr dbPtr, SafeAlpmHandle safeAlpmHandle) : base(IntPtr.Zero, true)
|
||||
{
|
||||
var success = false;
|
||||
|
||||
@@ -39,8 +38,9 @@ namespace Foodsoft.Alpm
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), PrePrepareMethod]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
var err = alpm.alpm_db_unregister(handle);
|
||||
SafeAlpmHandle.DangerousRelease();
|
||||
return true;
|
||||
return err == 0;
|
||||
}
|
||||
|
||||
public override bool IsInvalid
|
||||
|
||||
Reference in New Issue
Block a user