Hi Alexander,
You just need to remove your object (servant) from the object adapter, and nothing else:
Code:
adapter->remove(objectID);
Remember that your servant is a reference-counted object, and you should never call delete explicitly on it.
When you "add" a servant to the object adapter, Ice inserts this servant in the Active Servant Map (ASM)
and increases its refcount. When you remove the servant from the object adapter, Ice removes this servant from the ASM and releases this refcount. And when Ice dispatches a request on a servant it found in the ASM, it increments the refcount of this servant for the duration of the dispatch, to prevent the servant from being destroyed during such dispatch.
Remove does not wait for requests to complete: it just removes the servant from the ASM.
I hope this is clearer now.
Best regards,
Bernard