Closed Bug 46379 Opened 24 years ago Closed 23 years ago

nsPref.cpp memory management sucks

Categories

(Core :: Preferences: Backend, defect, P3)

All
Windows NT
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: dougt, Assigned: bnesse)

Details

(Keywords: embed, helpwanted, memory-leak, Whiteboard: [nsbeta3-])

Attachments

(1 file)

In many places this occurs:

if ()
{
 nsIFoo* specialChild2;
 SomeGetter(&specialChild2)
 if (anotherCondition)
    continue;  // just lost nsIFoo*
}
Keywords: embed, footprint, nsbeta2
+
Keywords: footprintmlk, patch
Whiteboard: nsbeta2+
cc'ing alecf, who sometimes fixes nsPref bugs.
yikes. Yes, I'll take this while I fix the 4197 other pref leaks :(
Assignee: dveditz → alecf
over to jrgm, who also looks into leaky issues. ;)
QA Contact: sairuh → jrgm
(I'll checkin for beta3, btw)
There are other problems with this file that I saw.  It is in need of some 
memory handling lovin.  It looks like we thought we were programming in java or 
something.
I think just nobody understood XPCOM at the time that it was written.
There are lots of small, specific leaks that I know about, and one wierd one
with the PL_hashtables that I need to investigate.. 

I just realized this was approved nsbeta2. I'd like to contest this because I
don't think it's worth the risk to fix these small, almost inconsequential leaks
within days of the beta. Jud?
Keywords: nsbeta3
point taken. -> beta3
Keywords: nsbeta2
Whiteboard: nsbeta2+ → nsbeta3+
Status: NEW → ASSIGNED
Target Milestone: --- → M18
ok, patch is in. thanks doug.
leaving bug open so I can keep hacking at this stuff
Whiteboard: nsbeta3+ → [nsbeta3+]
Alec, no activity on this bug in over a month.  Do you know anything today that
prevents us from cutting this?

If you have specific fixes in mind, please describe them and their impact and
we'll reconsider.
Whiteboard: [nsbeta3+] → [b3 need info][cut 9/6]
yeah, I think this is ok for now, I have a cleanup or two that will go in to fix 
42102, so let's minus this for now

removing status for nsbeta3- consideration. 

Keeping the bug open because there's still work to do, even if it's post-rtm. 
Purify shows me leaked prefs with some of my builds, though not all...and I 
haven't figured out what is triggering it.
Whiteboard: [b3 need info][cut 9/6]
nsbeta3-
Whiteboard: [nsbeta3-]
Target Milestone: M18 → Future
Target Milestone: Future → mozilla0.9
removing nsbeta3 keywords
Keywords: nsbeta3
How about getting this patch in, if it is correct? Let's create some activity
around this bug.
As per  Alec Flett 2000-07-31 13:57 the patch is checked in. Bug was kept open
as a reminder.
Marking Future to get off the radar since this bug seems to be a reminder bug 
now.
Target Milestone: mozilla0.9 → Future
Bulk assigning bugs covered by the rewrite of nsPrefs to myself.
Assignee: alecf → bnesse
Status: ASSIGNED → NEW
Bulk updating some fields and accepting
Status: NEW → ASSIGNED
Keywords: nsbeta1
Hardware: PC → All
Target Milestone: Future → mozilla0.9
Target Milestone: mozilla0.9 → Future
As this patch was checked in, and nspref.cpp is now just a temporary wrapper for
calls into nsPrefService and nsPrefBranch, I'm going to close this bug to get it
out of my bug list.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: