On 2014-08-08, 11:42 AM, Benjamin Smedberg wrote:
On 8/8/2014 11:25 AM, Ehsan Akhgari wrote:
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?
Then we should assert in debug builds! Perhaps we should even assert
that such pointers are cleared by the end of XPCOM-shutdown, although
that's more complexity.
We will have already shut down XPCOM and the profile will be unlocked,
so it is very likely that in such a scenario the write will succeed, go
to the correct place, or not be a risk of dataloss.
OK, I guess that's better than what we have now... Still I thought the
goal of this class is to avoid static initializers, so why do we want a
trivial destructor for it in release builds?
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform