diff options
author | vzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-06-16 09:39:48 +0000 |
---|---|---|
committer | vzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-06-16 09:39:48 +0000 |
commit | f4be62546eb975d617fe29adb9f7c4387c6738d0 (patch) | |
tree | 8acc4efb45fd12a6679865c5d338d4cfc2e05ec3 /TAO/tests/Two_Objects | |
parent | 3b0896ff6193391614a07455bd754018d4f4aa1e (diff) | |
download | ATCD-f4be62546eb975d617fe29adb9f7c4387c6738d0.tar.gz |
Wed Jun 16 09:35:25 UTC 2010 Vladimir Zykov <vladimir.zykov@prismtech.com>
* tests/Two_Objects/Object_Factory_i.cpp:
* tests/Two_Objects/server.cpp:
* tests/Faults/test_i.h:
* tests/CallbackTest/Service.cpp:
* tests/Portable_Interceptors/Dynamic/server.cpp:
* tests/Portable_Interceptors/Dynamic/client.cpp:
* tests/Portable_Interceptors/Bug_2510_Regression/server.cpp:
* tests/Portable_Interceptors/Bug_2510_Regression/client.cpp:
* tests/Portable_Interceptors/Service_Context_Manipulation/server.cpp:
* tests/Portable_Interceptors/Service_Context_Manipulation/client.cpp:
* tests/Portable_Interceptors/Bug_2133/client.cpp:
* tests/Portable_Interceptors/Bug_3080/client.cpp:
* tests/Portable_Interceptors/Register_Initial_References/server.cpp:
* tests/Portable_Interceptors/Register_Initial_References/Server_ORBInitializer.cpp:
* tests/Portable_Interceptors/Processing_Mode_Policy/Collocated/Collocated_Test.cpp:
* tests/Portable_Interceptors/Processing_Mode_Policy/Remote/client_main.cpp:
* tests/Portable_Interceptors/Bug_3079/Server_ORBInitializer.cpp:
* tests/Portable_Interceptors/Bug_3079/client.cpp:
* tests/Portable_Interceptors/Bug_1559/server.cpp:
* tests/Portable_Interceptors/Bug_1559/client.cpp:
* tests/Portable_Interceptors/Bug_1559/server_interceptor.cpp:
* tests/Portable_Interceptors/Bug_1559/server_interceptor.h:
* tests/Portable_Interceptors/Redirection/Server_ORBInitializer.cpp:
* tests/Portable_Interceptors/Redirection/client.cpp:
* tests/Portable_Interceptors/IORInterceptor/client.cpp:
* tests/Portable_Interceptors/Collocated/Dynamic/Collocated_Test.cpp:
* tests/Portable_Interceptors/ForwardRequest/client.cpp:
* tests/CodeSets/simple/server.cpp:
* tests/MT_BiDir/Sender_i.cpp:
* tests/MT_BiDir/Sender_i.h:
Fixed memory leaks local to these tests.
Diffstat (limited to 'TAO/tests/Two_Objects')
-rw-r--r-- | TAO/tests/Two_Objects/Object_Factory_i.cpp | 5 | ||||
-rw-r--r-- | TAO/tests/Two_Objects/server.cpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/TAO/tests/Two_Objects/Object_Factory_i.cpp b/TAO/tests/Two_Objects/Object_Factory_i.cpp index 107826a2312..426ab1c5052 100644 --- a/TAO/tests/Two_Objects/Object_Factory_i.cpp +++ b/TAO/tests/Two_Objects/Object_Factory_i.cpp @@ -22,10 +22,11 @@ Object_Factory_i::create_first (void) { First_i *first_impl; - // @@ Dont you want to transfer ownership to the POA? ACE_NEW_THROW_EX (first_impl, First_i (orb_.in(), two_way_done_ ), CORBA::NO_MEMORY() ); + // Ownership is transfered to the POA. + PortableServer::ServantBase_var safe (first_impl); CORBA::Object_var poa_object = this->orb_->resolve_initial_references("RootPOA"); @@ -54,6 +55,8 @@ Object_Factory_i::create_second (void) Second_i (orb_.in(), length_, two_way_done_), CORBA::NO_MEMORY ()); + // Ownership is transfered to the POA. + PortableServer::ServantBase_var safe (second_impl); CORBA::Object_var poa_object = this->orb_->resolve_initial_references("RootPOA"); diff --git a/TAO/tests/Two_Objects/server.cpp b/TAO/tests/Two_Objects/server.cpp index d50f6c745d3..18a19d7071f 100644 --- a/TAO/tests/Two_Objects/server.cpp +++ b/TAO/tests/Two_Objects/server.cpp @@ -86,6 +86,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) ACE_NEW_THROW_EX (factory_impl, Object_Factory_i (orb.in (), msglen), CORBA::NO_MEMORY ()); + PortableServer::ServantBase_var safe (factory_impl); // _this method registers the object withe the POA and returns // an object reference |