summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/POA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/PortableServer/POA.cpp')
-rw-r--r--TAO/tao/PortableServer/POA.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/TAO/tao/PortableServer/POA.cpp b/TAO/tao/PortableServer/POA.cpp
index 04f213688e6..9e3a0661ab0 100644
--- a/TAO/tao/PortableServer/POA.cpp
+++ b/TAO/tao/PortableServer/POA.cpp
@@ -374,17 +374,17 @@ TAO_POA::create_POA_i (const TAO_POA::String &adapter_name,
ACE_TRY_ENV),
CORBA::NO_MEMORY ());
- // Give ownership of the new map to the auto pointer. Note, that it
- // is important for the auto pointer to take ownership before
+ // Give ownership of the new map to the POA_var. Note, that it
+ // is important for the POA_var to take ownership before
// checking for exception since we may need to delete the new map.
- auto_ptr<TAO_POA> new_poa (poa);
+ PortableServer::POA_var new_poa = poa;
// Check for exception in construction of the POA.
ACE_CHECK_RETURN (0);
// Add to children map
result = this->children_.bind (adapter_name,
- new_poa.get ());
+ poa);
if (result != 0)
{
ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (),
@@ -402,9 +402,13 @@ TAO_POA::create_POA_i (const TAO_POA::String &adapter_name,
// initialized, the application can initialize the POA by invoking
// find_POA with a TRUE activate parameter.
- // Everything is fine. Don't let the auto_ptr delete the
+ // Everything is fine. Don't let the POA_var release the
// implementation.
- return new_poa.release ();
+ (void) new_poa._retn (); // We could do a "return new_poa._retn()"
+ // but the return type doesn't match this
+ // method's return type.
+
+ return poa;
}
PortableServer::POA_ptr
@@ -4396,9 +4400,7 @@ template class ACE_Array<PortableServer::ObjectId>;
template class ACE_Array_Base<PortableServer::ObjectId>;
//template class ACE_Auto_Basic_Ptr<TAO_Active_Object_Map_Iterator_Impl>;
-template class ACE_Auto_Basic_Ptr<TAO_POA>;
template class ACE_Auto_Basic_Ptr<TAO_Active_Object_Map>;
-template class ACE_Auto_Basic_Ptr<TAO_POA_Manager>;
template class ACE_Map_Entry<TAO_Unbounded_Sequence<unsigned char>, TAO_ServantBase *>;
template class ACE_Hash_Map_Entry<ACE_CString, TAO_POA *>;
template class ACE_Hash_Map_Manager<ACE_CString, TAO_POA *, ACE_Null_Mutex>;
@@ -4412,9 +4414,7 @@ template class ACE_Write_Guard<ACE_Lock>;
template class ACE_Read_Guard<ACE_Lock>;
//template class auto_ptr<TAO_Active_Object_Map_Iterator_Impl>;
-template class auto_ptr<TAO_POA>;
template class auto_ptr<TAO_Active_Object_Map>;
-template class auto_ptr<TAO_POA_Manager>;
template class ACE_Node<TAO_POA *>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
@@ -4423,9 +4423,7 @@ template class ACE_Node<TAO_POA *>;
#pragma instantiate ACE_Array_Base<PortableServer::ObjectId>
//#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Active_Object_Map_Iterator_Impl>
-#pragma instantiate ACE_Auto_Basic_Ptr<TAO_POA>
#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Active_Object_Map>
-#pragma instantiate ACE_Auto_Basic_Ptr<TAO_POA_Manager>
#pragma instantiate ACE_Map_Entry<TAO_Unbounded_Sequence<unsigned char>, TAO_ServantBase *>
#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, TAO_POA *>
#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, TAO_POA *, ACE_Null_Mutex>
@@ -4439,8 +4437,6 @@ template class ACE_Node<TAO_POA *>;
#pragma instantiate ACE_Read_Guard<ACE_Lock>
//#pragma instantiate auto_ptr<TAO_Active_Object_Map_Iterator_Impl>
-#pragma instantiate auto_ptr<TAO_POA>
#pragma instantiate auto_ptr<TAO_Active_Object_Map>
-#pragma instantiate auto_ptr<TAO_POA_Manager>
#pragma instantiate ACE_Node<TAO_POA *>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */