summaryrefslogtreecommitdiff
path: root/cpp/test/include
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-02-27 11:30:32 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-02-27 11:30:32 +0100
commit39f3974e52572f33ece6a167993827987210f67e (patch)
tree245b792b70ace2e55a39dd304f72349266c2a77b /cpp/test/include
parentAdded instructions for make clean (diff)
downloadice-39f3974e52572f33ece6a167993827987210f67e.tar.bz2
ice-39f3974e52572f33ece6a167993827987210f67e.tar.xz
ice-39f3974e52572f33ece6a167993827987210f67e.zip
Fixed UWP connection memory leak (ICE-8686)
Diffstat (limited to 'cpp/test/include')
-rw-r--r--cpp/test/include/TestCommon.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h
index f84c476bbeb..8a04a9fc081 100644
--- a/cpp/test/include/TestCommon.h
+++ b/cpp/test/include/TestCommon.h
@@ -186,22 +186,18 @@ inline testFailed(const char* expr, const char* file, unsigned int line)
ICE_DECLSPEC_EXPORT void dllTestShutdown(); \
void dllTestShutdown() \
{ \
- try \
- { \
- if(communicatorInstance) \
- { \
- communicatorInstance->destroy(); \
- } \
- } \
- catch(const Ice::LocalException&) \
+ if(communicatorInstance) \
{ \
+ communicatorInstance->destroy(); \
} \
} \
ICE_DECLSPEC_EXPORT int dllMain(int, char**, Test::MainHelper*); \
int dllMain(int argc, char** argv, Test::MainHelper* helper) \
{ \
Test::MainHelperInit init(helper, name, helper->redirect()); \
- return Test::mainEntryPoint(argc, argv); \
+ int status = Test::mainEntryPoint(argc, argv); \
+ communicatorInstance = ICE_NULLPTR; \
+ return status; \
} \
}