ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [05/28] ignite git commit: IGNITE-2376: .NET: Fixed interop processor leak. This closes #402.
Date Tue, 19 Jan 2016 09:12:45 GMT
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/ignite-2236
Commit: 2625129057f116dd037089a7078f1dab4fbb6b2e
Parents: b20dc40
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Mon Jan 18 12:21:40 2016 +0300
Committer: vozerov-gridgain <vozerov@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
                 {


Mime
View raw message