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 10:20:39 UTC

ignite git commit: IGNITE-2376: .NET: Fixed interop processor leak. This closes #402.

Repository: ignite
Updated Branches:
  refs/heads/master b20dc40fe -> 262512905


IGNITE-2376: .NET: Fixed interop processor leak. This closes #402.


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

Branch: refs/heads/master
Commit: 2625129057f116dd037089a7078f1dab4fbb6b2e
Parents: b20dc40
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Mon Jan 18 12:21:40 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Jan 18 12:21:40 2016 +0300

----------------------------------------------------------------------
 .../dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/26251290/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
index 4c8f1dc..e9800ee 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
@@ -57,7 +57,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         #region NATIVE METHODS: PROCESSOR
 
-        internal static IUnmanagedTarget IgnitionStart(UnmanagedContext ctx, string cfgPath, string gridName,
+        internal static void IgnitionStart(UnmanagedContext ctx, string cfgPath, string gridName,
             bool clientMode)
         {
             using (var mem = IgniteManager.Memory.Allocate().GetStream())
@@ -69,10 +69,12 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
                 try
                 {
+                    // OnStart receives the same InteropProcessor as here (just as another GlobalRef) and stores it.
+                    // Release current reference immediately.
                     void* res = JNI.IgnitionStart(ctx.NativeContext, cfgPath0, gridName0, InteropFactoryId,
                         mem.SynchronizeOutput());
 
-                    return new UnmanagedTarget(ctx, res);
+                    JNI.Release(res);
                 }
                 finally
                 {