On 24.11.2011 06:19, corremn wrote:
> Hi,
>
>
> Is there a way to unregister servant with POA or something so this
> does not happen? (something to reverse the effect of the _this()
> call?)
PortableServer::ObjectId_var oid;
PortableServer::POA_var poa;
poa = object->_default_POA();
oid = poa->servant_to_id(object);
object->_remove_ref();
poa->deactivate_object(oid);
should do. As soon as you remove the reference of the object, the POA
will notice that it can go away.
Greetings,
Thomas