[mapguide-commits] r6908 - in branches/2.4/MgDev/Desktop: . MgDesktop MgDesktop/Services/Feature UnitTest

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Jul 18 02:50:19 PDT 2012


Author: jng
Date: 2012-07-18 02:50:18 -0700 (Wed, 18 Jul 2012)
New Revision: 6908

Modified:
   branches/2.4/MgDev/Desktop/MgDesktop/MgDesktop.h
   branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FdoConnectionUtil.h
   branches/2.4/MgDev/Desktop/MgDesktopApi.sln
   branches/2.4/MgDev/Desktop/UnitTest/main.cpp
Log:
mg-desktop: more cleanup

Modified: branches/2.4/MgDev/Desktop/MgDesktop/MgDesktop.h
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/MgDesktop.h	2012-07-17 17:54:48 UTC (rev 6907)
+++ branches/2.4/MgDev/Desktop/MgDesktop/MgDesktop.h	2012-07-18 09:50:18 UTC (rev 6908)
@@ -80,11 +80,12 @@
 
 //Uncomment to debug memory leaks. This is the header for Visual Leak Detector
 //See: http://vld.codeplex.com for download and setup
-#ifdef _WIN32
-#ifdef _DEBUG
-#include <vld.h>
-#endif
-#endif
+//#ifdef _WIN32
+//#ifdef _DEBUG
+//#define USING_VLD
+//#include <vld.h>
+//#endif
+//#endif
 
 //Uncomment to get extra FDO join chatter when running unit tests
 //#define DEBUG_FDOJOIN

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FdoConnectionUtil.h
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FdoConnectionUtil.h	2012-07-17 17:54:48 UTC (rev 6907)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FdoConnectionUtil.h	2012-07-18 09:50:18 UTC (rev 6908)
@@ -1,6 +1,13 @@
 #ifndef DESKTOP_FDO_CONNECTION_UTIL_H
 #define DESKTOP_FDO_CONNECTION_UTIL_H
 
+#define RELEASE_AND_DEBUG_FDO_CONNECTION_REF_COUNT(methodName, fdoConn, expectedRefCount) \
+    FdoInt32 iRefCount = fdoConn->Release(); \
+    if (iRefCount != expectedRefCount) \
+    { \
+        ACE_DEBUG((LM_INFO, ACE_TEXT("[%W - WARNING] Expected refcount of %d. Instead, got a refcount of %d\n"), methodName, expectedRefCount, iRefCount)); \
+    } \
+
 class MgFdoConnectionPool;
 class FdoIConnection;
 class MgResourceIdentifier;

Modified: branches/2.4/MgDev/Desktop/MgDesktopApi.sln
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktopApi.sln	2012-07-17 17:54:48 UTC (rev 6907)
+++ branches/2.4/MgDev/Desktop/MgDesktopApi.sln	2012-07-18 09:50:18 UTC (rev 6908)
@@ -143,7 +143,6 @@
 		{67505883-F667-4C18-BCCA-63F3B76C64FF}.Release|x64.ActiveCfg = Release|x64
 		{67505883-F667-4C18-BCCA-63F3B76C64FF}.Release|x64.Build.0 = Release|x64
 		{E706FB1C-4431-4508-8A2F-239A143EFA1C}.Debug|Win32.ActiveCfg = Debug|Win32
-		{E706FB1C-4431-4508-8A2F-239A143EFA1C}.Debug|Win32.Build.0 = Debug|Win32
 		{E706FB1C-4431-4508-8A2F-239A143EFA1C}.Debug|x64.ActiveCfg = Debug|Win32
 		{E706FB1C-4431-4508-8A2F-239A143EFA1C}.Release|Win32.ActiveCfg = Release|Win32
 		{E706FB1C-4431-4508-8A2F-239A143EFA1C}.Release|Win32.Build.0 = Release|Win32
@@ -286,7 +285,6 @@
 		{CB91F23F-4882-433B-961B-15946BA8B965}.Release|x64.ActiveCfg = Release|x64
 		{CB91F23F-4882-433B-961B-15946BA8B965}.Release|x64.Build.0 = Release|x64
 		{3928C0FF-780C-4921-9921-FAA82162CA2B}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3928C0FF-780C-4921-9921-FAA82162CA2B}.Debug|Win32.Build.0 = Debug|Win32
 		{3928C0FF-780C-4921-9921-FAA82162CA2B}.Debug|x64.ActiveCfg = Debug|x64
 		{3928C0FF-780C-4921-9921-FAA82162CA2B}.Debug|x64.Build.0 = Debug|x64
 		{3928C0FF-780C-4921-9921-FAA82162CA2B}.Release|Win32.ActiveCfg = Release|Win32

Modified: branches/2.4/MgDev/Desktop/UnitTest/main.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/UnitTest/main.cpp	2012-07-17 17:54:48 UTC (rev 6907)
+++ branches/2.4/MgDev/Desktop/UnitTest/main.cpp	2012-07-18 09:50:18 UTC (rev 6908)
@@ -6,9 +6,9 @@
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 
-/*
 // for memory leak detection
-#ifdef _WIN32
+#if defined(_WIN32) && defined(_DEBUG)
+#if !defined(USING_VLD)
 #define _CRTDBG_MAP_ALLOC
 #include <stdlib.h>
 #include <crtdbg.h>
@@ -22,12 +22,12 @@
 #define new DEBUG_CLIENTBLOCK
 #endif
 #endif
-*/
+#endif
 
 #define TEST_COORDINATE_SYSTEM  0
 #define TEST_LOG_MANAGER        1
 #define TEST_RESOURCE_SERVICE   1
-#define TEST_FEATURE_SERVICE    0
+#define TEST_FEATURE_SERVICE    1
 #define TEST_MAPPING_SERVICE    1
 #define TEST_PROFILING_SERVICE  1
 #define TEST_RENDERING_SERVICE  1
@@ -35,8 +35,8 @@
 
 int main(int argc, char** argv)
 {
-/*
-#ifdef _WIN32
+#if defined(_WIN32) && defined(_DEBUG)
+#if !defined(USING_VLD)
     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
 
     #ifdef _DEBUG
@@ -46,7 +46,7 @@
     _CrtSetBreakAlloc(iBlock);
     #endif
 #endif
-*/
+#endif
 
     ACE_DEBUG((LM_INFO, ACE_TEXT("Initialize Platform.ini\n")));
     //Benchmark this



More information about the mapguide-commits mailing list