diff options
Diffstat (limited to 'cpp/test/Ice/gc/Client.cpp')
-rw-r--r-- | cpp/test/Ice/gc/Client.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpp/test/Ice/gc/Client.cpp b/cpp/test/Ice/gc/Client.cpp index cf4aa79fb4b..edddb6b4bc2 100644 --- a/cpp/test/Ice/gc/Client.cpp +++ b/cpp/test/Ice/gc/Client.cpp @@ -528,6 +528,31 @@ MyApplication::run(int argc, char* argv[]) cout << "testing leaf nodes... " << flush; { + NNPtr nn = new NN; + nn->l = new NL; + test(getNum() == 2); + Ice::collectGarbage(); + test(getNum() == 2); + } + Ice::collectGarbage(); + test(getNum() == 0); + + { + NLPtr p; + { + NNPtr nn = new NN; + p = new NL; + nn->l = p; + test(getNum() == 2); + Ice::collectGarbage(); + test(getNum() == 2); + } + Ice::collectGarbage(); + test(getNum() == 1); + } + test(getNum() == 0); + + { NNPtr nn = new NN; NLPtr nl = new NL; nn->l = nl; |