On Tue, Aug 5, 2014 at 1:09 AM, Mike Hommey <m...@glandium.org> wrote: > > On Mon, Aug 04, 2014 at 11:33:55AM -0700, Kyle Huey wrote: > > Yes, that's correct. You have to clear them somehow before the > > process exits or we leak. > > Which, besides accounting, is not really a problem, since the process is > exiting anyways. It can be a problem if desctructor code is actively > doing import stuff like persisting state.
And it may be worth pointing out that calling lots of destructors could in principle slow down shutdown -- which also means slowing down restart, I assume. I don't know if that's a real problem for us, but I once heard a MySQL dev remark that MySQL restart was at the time significantly slowed down by lots of free()s whose only purpose in life was to make valgrind happy. So I thought it was worth pointing out. (IIRC, MySQL is written in C, so the correctness issue of not running destructors was not applicable to them.) _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform