Closed Bug 52393 Opened 25 years ago Closed 25 years ago

nsMemoryImpl should not hold references to memory pressure observers

Categories

(Core :: XPCOM, defect, P3)

All
Mac System 8.5
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: sfraser_bugs, Assigned: waterson)

References

Details

(Keywords: memory-footprint, Whiteboard: [nsbeta3+])

nsMemoryImpl uses an nsISupportsArray to hold memory pressure observers. It should use nsIObserver (which uses weak references). This is contributing to an nsXBLService leak (bug 52392).
Also, calling nsMemory::UnregisterObserver() at shutdown should probably not call EnsureGlobalMemoryService() if gMemory == nsnull.
Keywords: footprint, nsbeta3
Whiteboard: [nsbeta3+]
Blocks: 46337
=> waterson
Assignee: warren → waterson
We use nsIObserver service now, which will hold weak references to observers.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.