diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-09-05 16:19:52 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-09-05 16:19:52 +0000 |
commit | d6671e5c8b19a32fbc99e2ac284fef4fdbca4323 (patch) | |
tree | 3b50f7eb2935fd6db8570cc7925bf08f1c731bff /cpp/test/IceXML/encoding/Client.cpp | |
parent | more icepatch work (diff) | |
download | ice-d6671e5c8b19a32fbc99e2ac284fef4fdbca4323.tar.bz2 ice-d6671e5c8b19a32fbc99e2ac284fef4fdbca4323.tar.xz ice-d6671e5c8b19a32fbc99e2ac284fef4fdbca4323.zip |
purify fixes
Diffstat (limited to 'cpp/test/IceXML/encoding/Client.cpp')
-rw-r--r-- | cpp/test/IceXML/encoding/Client.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/cpp/test/IceXML/encoding/Client.cpp b/cpp/test/IceXML/encoding/Client.cpp index 7374a5f5f39..e8bebff5b8d 100644 --- a/cpp/test/IceXML/encoding/Client.cpp +++ b/cpp/test/IceXML/encoding/Client.cpp @@ -330,7 +330,13 @@ TestClass2Rec(const Ice::CommunicatorPtr& communicator) test(out->r->r); test(in->c == out->c && in->name == out->name); test(in->r->c == out->r->c && in->r->name == out->r->name); - test(in == in->r->r); + test(out == out->r->r); + + // + // Clear recursive fields to avoid memory leak complains from Purify + // + in->r = 0; + out->r = 0; } class Class3I : public Test::Class3 @@ -411,7 +417,13 @@ TestClass3Rec(const Ice::CommunicatorPtr& communicator) test(out->r->r); test(in->c == out->c && in->name == out->name); test(in->r->c == out->r->c && in->r->name == out->r->name); - test(in == in->r->r); + test(out == out->r->r); + + // + // Clear recursive fields to avoid memory leak complains from Purify + // + in->r = 0; + out->r = 0; } void @@ -449,7 +461,7 @@ TestFacets(const Ice::CommunicatorPtr& communicator) test(out->r->r); test(in->c == out->c && in->name == out->name); test(in->r->c == out->r->c && in->r->name == out->r->name); - test(in == in->r->r); + test(out == out->r->r); Ice::ObjectPtr obj = out->ice_findFacet("red"); test(obj); Test::Class1Ptr outFacet = Test::Class1Ptr::dynamicCast(obj); @@ -458,6 +470,12 @@ TestFacets(const Ice::CommunicatorPtr& communicator) communicator->removeObjectFactory(Test::Class1::ice_staticId()); communicator->removeObjectFactory(Test::Class2::ice_staticId()); + + // + // Clear recursive fields to avoid memory leak complains from Purify + // + in->r = 0; + out->r = 0; } void |