You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/01/18 15:12:46 UTC

[41/50] ignite git commit: wip dispose fixes

wip dispose fixes


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

Branch: refs/heads/ignite-2324
Commit: 94a147bcc60867cbc85ce517921223c9ae63b014
Parents: a2583c8
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Jan 14 12:07:24 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Thu Jan 14 12:07:24 2016 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs       | 4 ++--
 .../dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs      | 2 +-
 .../Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs      | 2 +-
 .../dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs   | 2 +-
 .../Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs     | 2 +-
 .../Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs      | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/94a147bc/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
index e2b3d13..6066504 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/DataStreamerImpl.cs
@@ -545,9 +545,9 @@ namespace Apache.Ignite.Core.Impl.Datastream
 
                 Marshaller.Ignite.HandleRegistry.Release(_hnd, true);
                 Marshaller.Ignite.HandleRegistry.Release(_rcvHnd, true);
-
-                base.Dispose(false);
             }
+
+            base.Dispose(false);
         }
 
         /** <inheritDoc /> */

http://git-wip-us.apache.org/repos/asf/ignite/blob/94a147bc/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
index 87c357f..cb30051 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemory.cs
@@ -39,7 +39,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritdoc /> */
-        [SuppressMessage("Reliability", "S2930:\"IDisposables\" should be disposed")]
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public virtual PlatformMemoryStream GetStream()
         {
             return BitConverter.IsLittleEndian ? new PlatformMemoryStream(this) : 

http://git-wip-us.apache.org/repos/asf/ignite/blob/94a147bc/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
index b66a8ef..f934081 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryManager.cs
@@ -81,7 +81,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         /// Gets or creates thread-local memory pool.
         /// </summary>
         /// <returns>Memory pool.</returns>
-        [SuppressMessage("Reliability", "S2930:\"IDisposables\" should be disposed")]
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public PlatformMemoryPool Pool()
         {
             PlatformMemoryPool pool = _threadLocPool.Value;

http://git-wip-us.apache.org/repos/asf/ignite/blob/94a147bc/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
index bc813af..851d24f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
@@ -44,7 +44,7 @@ namespace Apache.Ignite.Core.Impl.Memory
         }
 
         /** <inheritdoc /> */
-        [SuppressMessage("Reliability", "S2930:\"IDisposables\" should be disposed")]
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public PlatformMemoryStream GetStream()
         {
             return BitConverter.IsLittleEndian ? new PlatformMemoryStream(this) :

http://git-wip-us.apache.org/repos/asf/ignite/blob/94a147bc/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
index f1382c0..714e639 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
@@ -92,7 +92,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
 
 
         /** <inheritDoc /> */
-        [SuppressMessage("Reliability", "S2930:\"IDisposables\" should be disposed")]
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         public ITransaction TxStart(TransactionConcurrency concurrency, TransactionIsolation isolation,
             TimeSpan timeout, int txSize)
         {

http://git-wip-us.apache.org/repos/asf/ignite/blob/94a147bc/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
index 5dc9897..7778484 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
@@ -284,7 +284,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
             }, true);
         }
 
-        [SuppressMessage("Reliability", "S2930:\"IDisposables\" should be disposed")]
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         private int CacheStoreInvoke(void* target, long objPtr, long memPtr, void* cb)
         {
             return SafeCall(() =>
@@ -605,7 +605,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
             });
         }
 
-        [SuppressMessage("Reliability", "S2930:\"IDisposables\" should be disposed")]
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
         private void DataStreamerStreamReceiverInvoke(void* target, long rcvPtr, void* cache, long memPtr, 
             byte keepBinary)
         {