On 2014-08-06, 1:32 PM, Benjamin Smedberg wrote:
On 8/6/2014 1:20 PM, Chris Peterson wrote:
I don't understand this sentence, but I strongly oppose automatically
clearing Static*Ptr in the static destructor in any build. In the past
we have had static comptr cause final release of objects after XPCOM
shutdown, which causes crashes due to the component manager or CC or
other infrastructure already being shut down.
Wouldn't that be a bug that should be fixed?
Sure, it's a leak bug that should be fixed. But since figuring out
whether a late release will cause a crash or a security issue or is
harmless is hard, it's better to assert in debug builds and leak in
release builds than to clear in release builds. So far I don't think
anyone has proposed crashing in release builds, which I don't think is
worth the risk.
The problem I was mentioning is not related to the leak at all. What if
one of these destructors runs code that writes something to the disk for
example, which we expect to go to the disk before we shut down?
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform