lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [03/47] lucenenet git commit: Fixed bug in Core.Store.NativeFSLockFactory - Dispose() override missing.
Date Tue, 11 Oct 2016 18:34:48 GMT
Fixed bug in Core.Store.NativeFSLockFactory - Dispose() override missing.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e9f1d92d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e9f1d92d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e9f1d92d

Branch: refs/heads/master
Commit: e9f1d92d745c72ca598a2610bb9d6bb84cb02d78
Parents: e596a4d
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Oct 6 23:10:52 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Oct 6 23:10:52 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/NativeFSLockFactory.cs | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e9f1d92d/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs b/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
index 0baf36c..532308d 100644
--- a/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
+++ b/src/Lucene.Net.Core/Store/NativeFSLockFactory.cs
@@ -195,6 +195,16 @@ namespace Lucene.Net.Store
             }
         }
 
+        public override void Dispose()
+        {
+            // LUCENENET: No lock to release, just dispose the channel
+            if (Channel != null)
+            {
+                Channel.Dispose();
+                Channel = null;
+            }
+        }
+
         public override void Release()
         {
             lock (this)


Mime
View raw message