[commit] r2734 - in trunk: Doc SDK/DotNet/CSharpComponentWizard/Templates SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Feb 5 11:28:09 CST 2018


Author: ksmyth
Date: Mon Feb  5 11:28:09 2018
New Revision: 2734

Log:
C# AddOn wizard: fix deactivating addon when restarting addons

Modified:
   trunk/Doc/README_in.txt
   trunk/SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon.zip
   trunk/SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon/MyAddon.cs

Modified: trunk/Doc/README_in.txt
==============================================================================
--- trunk/Doc/README_in.txt	Mon Feb  5 11:28:04 2018	(r2733)
+++ trunk/Doc/README_in.txt	Mon Feb  5 11:28:09 2018	(r2734)
@@ -25,6 +25,11 @@
 1. Release Notes
 ************************************************
 
+Release Notes
+----------------------------------
+  - Binary compatibility with 11.12.2
+  - C# AddOn wizard: fix deactivating addon when restarting addons
+
 Release Notes of Release 17.12.6
 ----------------------------------
   - Binary compatibility with 11.12.2

Modified: trunk/SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon.zip
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon/MyAddon.cs
==============================================================================
--- trunk/SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon/MyAddon.cs	Mon Feb  5 11:28:04 2018	(r2733)
+++ trunk/SDK/DotNet/CSharpComponentWizard/Templates/CSharpAddon/MyAddon.cs	Mon Feb  5 11:28:09 2018	(r2734)
@@ -15,7 +15,7 @@
     ProgId(ComponentConfig.progID),
     ClassInterface(ClassInterfaceType.AutoDual)]
     [ComVisible(true)]
-    public class MyAddon : IMgaComponentEx, IGMEVersionInfo, IMgaEventSink
+    public class MyAddon : IMgaComponentEx, IGMEVersionInfo, IMgaEventSink, IDisposable
     {
 
         private MgaAddOn addon;
@@ -37,6 +37,7 @@
                     }
                     GMEConsole = null;
                 }
+                addon.Destroy();
                 Marshal.FinalReleaseComObject(addon);
                 addon = null;
             }
@@ -244,5 +245,14 @@
         }
 
         #endregion
+
+        public void Dispose()
+        {
+            if (addon != null)
+            {
+                addon.Destroy();
+                addon = null;
+            }
+        }
     }
 }


More information about the gme-commit mailing list