On Fri, Jun 07, 2019 at 09:18:38AM +0300, Henri Sivonen wrote:
For late shutdown cleanup, we have nsLayoutStatics::Shutdown(). Do we
have a similar method for running things as soon as we've decided that
the application is going to shut down?

(I know there are observer topics, but I'm trying to avoid having to
create an observer object and to make sure that _it_ gets cleaned up
properly.)

Observers are automatically cleaned up at XPCOM shutdown, so you generally don't need to worry too much about them. That said, nsIAsyncShutdown is really the way to go when possible. But it currently requires an unfortunate amount of boilerplate.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to