Closed
Bug 39859
Opened 25 years ago
Closed 24 years ago
nsDirectoryService leaking nsLocalFile
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
VERIFIED
FIXED
M17
People
(Reporter: inaky.gonzalez, Assigned: rayw)
References
Details
(Keywords: memory-leak)
Attachments
(2 files)
WHERE:
xpcom/io/nsDirectoryService.{cpp,h}
PROBLEM:
nsDirectoryService instance leaking nsLocalFiles. the problem comes
from the entries to nsLocalFile being stored in a hash table that was
being stored trough a nsHashtable*, though later created as
nsSupportsHashtable. As the inheritance wasn't done polimorphical
(virtual methods and dtor), the table would not behave as it should
(or as it was thought to).
Also there is problems when cloning files, as the code is not taking
into account that nsLocalFile::Clone() references the objects it
creates.
SOLLUTION:
Fix nsSupportsHashtable (see bug #38606) and then fix the places where
nsDirectoryService.cpp needs tweaking for the new hash table
behaviour, as well as take into account that nsLocalFile::Clone()
references the pointers it gives.
I have patches available for this (that need the patches for the
nsSupportsHashtable). We are internally reviewing them and will post
them ASAP.
Comment 1•25 years ago
|
||
Ray can you take care of this while you fix the supportsHashTable bug.
Assignee: dp → rayw
Summary: nsDirectoryService leaking nsLocalFile → nsDirectoryService leaking nsLocalFile
Reporter | ||
Comment 2•25 years ago
|
||
Ray, the nsSupportsHastable bug is already fixed (I mean, I have a patch for it
which covers all the known (for me) usages of it). We're reviewing it here and
I want to submit it ASAP.
Assignee | ||
Comment 4•25 years ago
|
||
I don't know how to weight this one. I suspect if this is a frequently used
service, it probably needs to be M17 as well. I'll make it that and see what
others say.
Target Milestone: --- → M17
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 5•25 years ago
|
||
Assignee | ||
Comment 6•25 years ago
|
||
I have reviewed this code. It looks correct. It is required for bug 38606 to
be completely fixed and before 38606 can be put back.
Reporter | ||
Comment 7•25 years ago
|
||
Reporter | ||
Comment 8•24 years ago
|
||
Closing this bug, fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•