According to skruffy, each tab that's open when you click 'new identity' contributes to more lost memory.
For normal tabs, when you close them, eventually the memory from them garbage collects or otherwise returns to the system. For tabs closed by new identity, it remains lost.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
According to skruffy, this is due to the call to eventSuppressor.suppressEventHandling() during torbutton_disable_all_js(). Removing it eliminates the leak. Possibly DOM events are required to unref all of the objects in a window?
Oddly, the leaks still happen if JS is fully disabled, at least via NoScript's disabling.
Trac: Summary: "new identity" leaks memory? to "new identity" leaks memory in
The leaked memory is primarily concentrated in the 'heap-unclassified' section of about:memory, and this is reproducible even if you just mash New Identity a bunch of times without loading any web pages.
Still an issue with FF24?
Yes, it is still an issue with Firefox. All open pages adds content to never purgeable garbage of Firefox's memory if to choose "new identity". Some of used urls visible as window-objects via about:memory (with verbose report enabled)
Trac: Summary: "new identity" leaks memory in evenSuppressor.suppressEventHandling() to "new identity" leaks memory in eventSuppressor.suppressEventHandling()
I think we should revisit this in the ff38-esr timeframe. I am very nervous about Mozilla's belief that they completely fixed the underlying problem of being able to disable Javascript on a tab, and I'd like to review that code in-depth. However, it seems a little silly to dig through the ff31-esr code right now only to have some crucial detail change on us in ff38-esr.
Unless of course there is a way to avoid the memory leak by removing the event suppressors in an unload handler or something similar while disposing of the associated tab. That might feel a little safer to me. Maybe. I still think I'd be wary of doing this in the 4.5 series though...