Home Help Center

Object* add(Object servant, Identity id),can the servant be static object?

russulerussule Member Lei ChunOrganization: www.channelsoft.com.cnProject: Conf ✭✭
I did a test, wrote a server with Ice.3.2.0 in windows xp.
static confI* Inst()
		static confI cb;
		return &cb;
adapter->add([B]confI::Inst(), [/B]communicator()->stringToIdentity("conf"));

The server runs well, but when i closed it,it occurs excetion.

Debug Assertion Failed!

When I didn't use the static object,
adapter->add(new [B]confI,[/B]communicator()->stringToIdentity("conf"));
there was no exception occured.

the Object* add(Object servant, Identity id) function.
can the servant be the static object?


  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    Ice servants must be allocated on the heap. Please see this FAQ for a complete explanation.
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Also, can you please check your private messages and get back to us?
Sign In or Register to comment.