Closed Bug 1684891 Opened 4 years ago Closed 4 years ago

sNativeKeyEventsMap leaks

Categories

(Core :: Widget: Cocoa, defect)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jrmuizel, Assigned: mstange)

References

Details

Attachments

(1 file)

The object is autoreleased without an autorelease pool in place because it runs as a static constructor.

This was found by running with OBJC_DEBUG_MISSING_POOLS=YES LIBDISPATCH_DEBUG_MISSING_POOLS=NO

It's a global map, so it's intended to "leak". But it's worth fixing it so that it doesn't trigger warnings.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED

There is no autorelease pool in place at the time that C++ globals are initialized, so this array
causes warnings when running with .
And avoiding static initializers is a good practice anyway.

Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/adfa61d56f9c Stop allocating an autoreleased NSMutableDictionary from a C++ static initializer for sNativeKeyEventsMap. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: