[commit] r2516 - trunk/GME/Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Fri Aug 1 15:23:15 CDT 2014
Author: ksmyth
Date: Fri Aug 1 15:23:15 2014
New Revision: 2516
Log:
MgaProject:StopAutoAddOns: call Dispose if the addon implements it. Useful for C# AddOns, since they cant detect final Release
Modified:
trunk/GME/Mga/MgaProject.cpp
Modified: trunk/GME/Mga/MgaProject.cpp
==============================================================================
--- trunk/GME/Mga/MgaProject.cpp Mon Jul 28 11:10:37 2014 (r2515)
+++ trunk/GME/Mga/MgaProject.cpp Fri Aug 1 15:23:15 2014 (r2516)
@@ -1300,11 +1300,23 @@
}
+
+MIDL_INTERFACE("805D7A98-D4AF-3F0F-967F-E5CF45312D2C")
+IDisposable : public IDispatch {
+public:
+ virtual VOID STDMETHODCALLTYPE Dispose() = 0;
+};
+
void CMgaProject::StopAutoAddOns() {
while(!autocomps.empty()) {
CComPtr<IMgaComponent> addon;
addon.Attach(autocomps.front());
autocomps.pop_front();
+ CComPtr<IDisposable> disposable;
+ if (SUCCEEDED(addon->QueryInterface(&disposable)))
+ {
+ disposable->Dispose();
+ }
addon.Release();
}
#ifdef DEBUG
More information about the gme-commit
mailing list