Closed
Bug 352827
Opened 18 years ago
Closed 18 years ago
Appearance pref pane leaks font mapping table on every load
Categories
(Camino Graveyard :: Preferences, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)
Details
(Keywords: fixed1.8.1.1)
Attachments
(1 file)
699 bytes,
patch
|
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
setupFontRegionPopup is called on every pane load, which creates and retains mRegionMappingTable, but mRegionMappingTable is only released in dealloc. It needs to be released whenever the pane is unloaded, since right now that array and everything in it are leaked.
Comment 1•18 years ago
|
||
The problem with this is that we don't actually call |mainViewDidLoad| every time the prefpane is opened (1. Open prefs 2. select a prefpane 3. cmd-w 4. open prefs, |mainViewDidLoad| not called), so if we release every time the prefpane closes, we'll over-release. Perhaps the real solution to that problem is to call |mainViewDidLoad| every time the prefs open, regardless of whether that pane was the last one seen.
Assignee | ||
Comment 2•18 years ago
|
||
As long as you always set member variables to nil when they are released, which you pretty much always should in a non-dealloc method, it's impossible to over-release them (assuming you did in fact have a strong ref).
But if the expectation is that the mapping might become stale, it probably should be refreshed on every display (and if that's not the expectation, the map should only be created once).
Assignee | ||
Comment 3•18 years ago
|
||
This fixes the leak the direct way.
Ideally that data would only exist while the pane is showing, but that's not possible at the moment (filed as bug 358318).
Assignee: nobody → stuart.morgan
Status: NEW → ASSIGNED
Attachment #243750 -
Flags: superreview?(mikepinkerton)
Comment 4•18 years ago
|
||
Comment on attachment 243750 [details] [diff] [review]
stop leaking
cute. sr=pink
Attachment #243750 -
Flags: superreview?(mikepinkerton) → superreview+
Comment 5•18 years ago
|
||
Checked in on 1.8branch and trunk.
Updated•18 years ago
|
Keywords: fixed1.8 → fixed1.8.1
Updated•18 years ago
|
Keywords: fixed1.8.1.1
Updated•18 years ago
|
Keywords: fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•