Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-03-29 17:49:55 +0400
committernulltoken <emeric.fermas@gmail.com>2012-03-29 17:49:55 +0400
commit6cd37c3cd5cff68e55eba177dfb1e2c0fb51ab6e (patch)
tree25fcd2097abbfb3a8add981d65476632d7fcbb5b /LibGit2Sharp
parentf8e97d4fdcbd6ead85a1e390754eed1934b58ef6 (diff)
Add ReferenceSafeHandle type
Diffstat (limited to 'LibGit2Sharp')
-rw-r--r--LibGit2Sharp/Core/Handles/ReferenceSafeHandle.cs11
-rw-r--r--LibGit2Sharp/LibGit2Sharp.csproj1
2 files changed, 12 insertions, 0 deletions
diff --git a/LibGit2Sharp/Core/Handles/ReferenceSafeHandle.cs b/LibGit2Sharp/Core/Handles/ReferenceSafeHandle.cs
new file mode 100644
index 00000000..e6baf424
--- /dev/null
+++ b/LibGit2Sharp/Core/Handles/ReferenceSafeHandle.cs
@@ -0,0 +1,11 @@
+namespace LibGit2Sharp.Core.Handles
+{
+ internal class ReferenceSafeHandle : SafeHandleBase
+ {
+ protected override bool ReleaseHandle()
+ {
+ NativeMethods.git_reference_free(handle);
+ return true;
+ }
+ }
+}
diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj
index 34d5d0f9..3f3b2a23 100644
--- a/LibGit2Sharp/LibGit2Sharp.csproj
+++ b/LibGit2Sharp/LibGit2Sharp.csproj
@@ -64,6 +64,7 @@
<Compile Include="Core\Handles\NotOwnedSafeHandleBase.cs" />
<Compile Include="Core\Handles\OidSafeHandle.cs" />
<Compile Include="Core\ReferenceExtensions.cs" />
+ <Compile Include="Core\Handles\ReferenceSafeHandle.cs" />
<Compile Include="Core\Handles\SignatureSafeHandle.cs" />
<Compile Include="Core\Handles\TreeEntrySafeHandle.cs" />
<Compile Include="DetachedHead.cs" />