blob: d9c05abf4f7d2b831771dd31ba1e1a4d5af34ad4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System;
using System.Runtime.InteropServices;
namespace LibGit2Sharp.Core.Handles
{
internal abstract class NotOwnedSafeHandleBase : SafeHandle
{
protected NotOwnedSafeHandleBase()
: base(IntPtr.Zero, false)
{
}
public override bool IsInvalid
{
get { return IsZero; }
}
public bool IsZero
{
get { return (handle == IntPtr.Zero); }
}
protected override bool ReleaseHandle()
{
// Does nothing as the pointer is owned by libgit2
return true;
}
}
}
|