[omniORB] Please help. Servant and ANY memory management

Dmitry Samersoff dms at wplus.net
Tue Nov 9 13:46:52 GMT 2004


Hi,

I passed reference to active servant to server as CORBA::Any.

Than, when I try to destroy this servant (either by
etherealize method of servant activator, or by hand)
servant either not destroed at all or server coredump
because the same servant destroed twice.

All works fine if I don't use CORBA::Any.

I tried different methods of managing servant:
creating separate POA, using PortableServer::RefCountServantBase,
or maintain my own garbage collection, but nothing helps.

Any ideas what is wrong ?

PS:

Client code looks like:

	Graph_var g = open();
	Servant_var my_servant = g.createServant();
  	 g.add( toANY(my_servant) );
          g.close();

Server code:
	Graph_impl::createServant(){
			....
			toGarbage(_impl);
	}

	Graph_impl::close(){
		while( garbage ){		
			
		PortableServer::ObjectId_var
		    oid = _rootPOA->servant_to_id(garbage);
  	   _rootPOA->deactivate_object(oid);
	}

-- 
Dmitry Samersoff
dms at samersoff.net, http://devnull.wplus.net
ICQ: 3161705
* There will come soft rains ...




More information about the omniORB-list mailing list