Neil Stansbury wrote:

Hi all,

How do you terminate/shutdown an XPCOM service so that it can be re-initialised as new. I can't find anything in the XPCOM services that allows a service to be terminated or shutdown.

Cheers,


Yeah, basically there is no API to do that. Once a service is instantiated, it becomes a singleton that lives on until XPCOM is shutdown.

That said, nsIServiceManagerObsolete::UnregisterService does what you want, but that is a deprecated API. I wouldn't count on using UnregisterService in code that is meant to work with future versions of XPCOM.

-Darin
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to