reliable unbinding of names

Paul Nader naderp@d22mail.alcatel.com.au
Sun, 15 Feb 1998 20:14:49 +1100 (EST)


Hi,

I have a server which binds each object it creates to the Naming Service as
the objects are created and then blocks in the boa waiting for requests. I 
have coded the destructors for the object implementations so that they will
automatically unbind themselves from the name server.

This works fine if I call _dispose for each object instance, but if I type
CTR-C the server simply exits without calling the destructors, hence the
objects remain registered.

Is there a "reliable" way of doing what I want. I.e  ensuring that when the
server exits the name server is cleaned up, other than restaring the name
service between runs or deleting the hierarchy of names on start-up?. 

Thanks in advance, Paul.