[Mobies-commit] [commit] r3662 - UDM/trunk/src/UdmGme

ksmyth at redhat1.isis.vanderbilt.edu ksmyth at redhat1.isis.vanderbilt.edu
Tue Mar 22 15:51:33 CDT 2011


Author: ksmyth
Date: Tue Mar 22 15:51:33 2011
New Revision: 3662

Log:
Use dynamic cast to look at runtime type of root object, since we want to be able to CloseNoUpdate without a transaction

Modified:
   UDM/trunk/src/UdmGme/UdmGme.cpp

Modified: UDM/trunk/src/UdmGme/UdmGme.cpp
==============================================================================
--- UDM/trunk/src/UdmGme/UdmGme.cpp	Tue Mar 22 15:51:02 2011	(r3661)
+++ UDM/trunk/src/UdmGme/UdmGme.cpp	Tue Mar 22 15:51:33 2011	(r3662)
@@ -3816,7 +3816,8 @@
 
 	UDM_DLL void GmeDataNetwork::CloseNoUpdate()			
 	{  
-		if(rootobject) {
+		// Use dynamic_cast here instead of UdmObject::operator bool since for .NET we may no longer be in a transaction (e.g. GC)
+		if (dynamic_cast<GmeObject*>(rootobject.__impl())) {
 			rootobject = NULL;
 			
 			// only if this is the lastdata network closed.


More information about the Mobies-commit mailing list