Closed
Bug 1512557
Opened 6 years ago
Closed 6 years ago
nsIStringBundle references not freed in nsCharsetConverterManager
Categories
(MailNews Core :: Internationalization, enhancement)
MailNews Core
Internationalization
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 65.0
People
(Reporter: darktrojan, Assigned: darktrojan)
Details
Attachments
(1 file)
2.89 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•6 years ago
|
||
I could've done this by just adding the Shutdown() call, but since I need to learn more about these things, I did more.
Attachment #9029899 -
Flags: review?(jorgk)
Comment 2•6 years ago
|
||
Comment on attachment 9029899 [details] [diff] [review] 1512557-free-pointers-1.diff As you said, adding Shutdown() would have done the trick. Personally I suggest to give StaticRefPtr<> a go instead, since the COM-ness is not a factor here. Is this perhaps the key to bug 1377692? Ben was chasing some leak. Maybe he can see whether the patch fixes something, or we'll notice when it lands.
Flags: needinfo?(benc)
Comment 3•6 years ago
|
||
Comment on attachment 9029899 [details] [diff] [review] 1512557-free-pointers-1.diff As per our IRC conversation, using StaticRefPtr gives compile errors, but this works: static RefPtr<nsIStringBundle> sDataBundle; static RefPtr<nsIStringBundle> sTitleBundle; In the end it doesn't matter since all we care about it the ref-counting and the release, in this case decreasing the ref-count by nulling the reference.
Attachment #9029899 -
Flags: review?(jorgk) → review+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/21219ad63ec8 Convert nsIStringBundle pointers to nsCOMPtrs and release them when shutting down. r=jorgk DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment 5•6 years ago
|
||
I took the liberty to inline the Shutdown() function since it didn't have much use otherwise.
Target Milestone: --- → Thunderbird 65.0
You need to log in
before you can comment on or make changes to this bug.
Description
•