Closed Bug 124517 Opened 23 years ago Closed 23 years ago

Double deletes happen because we can make more than one nsMacMemoryCushion

Categories

(Core :: XUL, defect, P2)

PowerPC
Mac System 9.x
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

References

Details

Attachments

(1 file)

We've always worked under the assumption that the nsAppShell in Mac widget code 
is a singleton, and thus given it ownership of the nsMacMemoryCushion.

However, we can create multiple nsAppShell objects, since we make one for each 
nested event loop (e.g. modal dialogs, including the profile picker). This means 
that we can instantiate > 1 nsMacMemoryCushion, each of which install a 
GrowZoneProc, and dispose the buffer handle in their dtors .This is bad.
Severity: normal → critical
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.9
Nit: softFluffyCusion?  Don't you want a softFluffyCushion?  And the whitespace 
in nsAppShell::Create() seems off.  Other than that, r=sdagley
I've been having a bad speling day today
*** Bug 106283 has been marked as a duplicate of this bug. ***
*** Bug 88946 has been marked as a duplicate of this bug. ***
Comment on attachment 68679 [details] [diff] [review]
Patch to ensure that nsMemoryCusion is a singleton

sr=beard (r=sdagley already)
same nits...
Attachment #68679 - Flags: superreview+
Attachment #68679 - Flags: review+
*** Bug 114907 has been marked as a duplicate of this bug. ***
what does introducting 

+std::auto_ptr<nsMacMemoryCushion> gMemoryCusion;

do to embedding clients? Will this ever get released? Doesn't seem to play nice.'
+std::auto_ptr<nsMacMemoryCushion> gMemoryCusion;

The delete will happen at library unload time, which seems correct.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 93458 has been marked as a duplicate of this bug. ***
*** Bug 121664 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: