On Thu, Jun 30, 2016, at 04:35 PM, smaug wrote: > Not sure if this matters here, but cycle collector doesn't really retain > objects. Sure, we could explicitly clear so called jsholders, so that > C++->JS > edges are manually cut. But in general, CC doesn't know about a cycle > collectable objects unless the object has been addrefed/released after > the > previous cycle collection. > (those operations make the object suspected, so the object is put to > cycle collector's purple buffer).
Yeah, sorry, the wording was inaccurate. Something phrased like this would make more sense: All modules should deallocate all or as much as they can of their short-lived objects during phase 1 so that at the end of phase 1 a cycle collection is run and all cycles are already broken. If a cycle still exist at this point, it should be considered a bug. The problems we currently are not the CC's "fault", it comes from garbage collected and reference-counted objects being destroyed at various times during ShutdownXPCOM, which means we have to shut the CC down (and run the last cycle-collection which will free some more dynamic objects) at the very end when there isn't much left of gecko that is in a valid state. I'll clarify in the document. Cheers, Nical _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform