Closed Bug 1512557 Opened 11 months ago Closed 11 months ago
IString Bundle references not freed in ns Charset Converter Manager
No description provided.
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 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.
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 email@example.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: 11 months ago
Resolution: --- → FIXED
I took the liberty to inline the Shutdown() function since it didn't have much use otherwise.
Target Milestone: --- → Thunderbird 65.0
Didn't help bug 1377692.
You need to log in before you can comment on or make changes to this bug.