summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/stream/Client.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-03-31 01:31:36 +0000
committerBenoit Foucher <benoit@zeroc.com>2017-03-31 01:31:36 +0000
commit7f94238dd3d2623e416fb1e8236e55848fc2c8f8 (patch)
tree36d16e6153ecf886f48befd99f12bb08d8427de6 /cpp/test/Ice/stream/Client.cpp
parentFixed previous Util.py fix (diff)
downloadice-7f94238dd3d2623e416fb1e8236e55848fc2c8f8.tar.bz2
ice-7f94238dd3d2623e416fb1e8236e55848fc2c8f8.tar.xz
ice-7f94238dd3d2623e416fb1e8236e55848fc2c8f8.zip
Fixes for ICE-7012 - fixed some leaks in IceSSL/tests
Diffstat (limited to 'cpp/test/Ice/stream/Client.cpp')
-rw-r--r--cpp/test/Ice/stream/Client.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp
index 2d2b0cdce88..0f3e74f3e99 100644
--- a/cpp/test/Ice/stream/Client.cpp
+++ b/cpp/test/Ice/stream/Client.cpp
@@ -853,6 +853,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator)
out.write(arr);
out.writePendingValues();
out.finished(data);
+
Ice::InputStream in(communicator, data);
MyClassS arr2;
in.read(arr2);
@@ -892,6 +893,30 @@ run(int, char**, const Ice::CommunicatorPtr& communicator)
test(arr2S[0].size() == arrS[0].size());
test(arr2S[1].size() == arrS[1].size());
test(arr2S[2].size() == arrS[2].size());
+
+#ifdef ICE_CPP11_MAPPING
+ auto clearS = [](MyClassS& arr) {
+ for(MyClassS::iterator p = arr.begin(); p != arr.end(); ++p)
+ {
+ if(*p)
+ {
+ (*p)->c = nullptr;
+ (*p)->o = nullptr;
+ (*p)->d["hi"] = nullptr;
+ }
+ }
+ };
+ auto clearSS = [clearS](MyClassSS& arr) {
+ for(MyClassSS::iterator p = arr.begin(); p != arr.end(); ++p)
+ {
+ clearS(*p);
+ }
+ };
+ clearS(arr);
+ clearS(arr2);
+ clearSS(arrS);
+ clearSS(arr2S);
+#endif
}
#ifndef ICE_CPP11_MAPPING
@@ -1049,7 +1074,16 @@ run(int, char**, const Ice::CommunicatorPtr& communicator)
test(ex1.c->seq7 == c->seq7);
test(ex1.c->seq8 == c->seq8);
test(ex1.c->seq9 == c->seq9);
+
+#ifdef ICE_CPP11_MAPPING
+ ex1.c->c = nullptr;
+ ex1.c->o = nullptr;
+#endif
}
+#ifdef ICE_CPP11_MAPPING
+ c->c = nullptr;
+ c->o = nullptr;
+#endif
}
{