Closed Bug 6984 Opened 25 years ago Closed 25 years ago

A bug to review profile code re memory management

Categories

(Core Graveyard :: Profile: BackEnd, defect, P3)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: racham, Assigned: racham)

References

Details

Attachments

(1 file)

Review profile code to avoid memory management and other possible problems.
Status: NEW → ASSIGNED
Target Milestone: M7
Opened a new bug to review profile code.
Summary: A bug to review profile code re memory management
Added a summary line
*** Bug 7209 has been marked as a duplicate of this bug. ***
Attached patch bit of code cleanup (deleted) — Splinter Review
The patch I attached should clean up the code a bit. It removes some stuff that isn't needed, looks at bracketing some initializers correctly (You need to review how I bracked the first one). It also removes most of the memory allocation from this file as it happens in stuff that gets called. It appears that things are getting freed properly offhand in those cases. More review is probably necessary yet though.
To address the leak of m_reg that was reported on bug #7209, it looks like a bunch of methods NS_ADDREF(m_reg), but not one of the does an NS_RELEASE() on it. Should be fairly straightforward to fix. I'll see if I can do it today.
Actually, I won't be submitting a patch for that. Someone that groks nsCOMPtr and such should do this, seems wrong to be addref'ing this everywhere in here like that.
*** Bug 7701 has been marked as a duplicate of this bug. ***
First level review is done. Cleaned up lots of stuff. Still need to work on NS_ADDREFs and the optimization of code to reduce the profile dll size.
Target Milestone: M7 → M8
Next level reviews, including using nsCOMPtr and having a global handle for Profiles subtree will be done in M8.
Blocks: 9184
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Added the required patches. For further improvements, opening a new bug for M9. Closing this bug.
Can you point at the version of nsProfile.cpp where these patches were added to fix the problems? In fact, the changes to support Netcenter stuff added even more instances of addref'ing the registry and never releasing it.
Status: RESOLVED → REOPENED
Bug 9275 is opened to keep track of missed changes and new improvements to profile module. Though not all, couple of changes like removing unnecessary memory allocations are incorporated in the current version. I will continue to work with remaining patches and nsCOMPtr stuff for ADD_REFs in the next two days. Reopening the bug to fix some more issues and carry minimum number of changes to M9.
Resolution: FIXED → ---
Clearing Fixed resolution since this bug has been re-opened.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
All the changes submitted are taken. Latest version (1.23) of nsProfile incorporates the changes. Further improvements in M9 tracked by the bug 9275. Closing the bug.
Status: RESOLVED → VERIFIED
Component: Profile Manager → Profile Manager BackEnd
Moving all Profile Manager bugs to new Profile Manager Backend component. Profile Manager component to be deleted.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: