Closed Bug 29907 Opened 20 years ago Closed 20 years ago

[MLK] nsEventQueueServiceImp leaking

Categories

(SeaMonkey :: UI Design, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: beard, Assigned: shaver)

References

()

Details

(Keywords: memory-leak)

Attachments

(3 files)

I could swear I've filed this bug before... Anyhow, the call to 
nsServiceManager::GetService in the URL above leaks a refCount of the 
nsEventQueueServiceImp. A call to nsServiceManager::ReleaseService() sounds like 
the right fix. Excuse me if this bug was already filed. I'm still seeing the 
leak.
I'll take this.
Assignee: rpotts → warren
Target Milestone: M15
Moving non-essential, non-beta2 and performance-related bugs to M17.
Target Milestone: M15 → M17
I've got a patch for this, which sprinkles the file liberally with nsCOMPtrs and
NS_WITH_SERVICE and fixes this particular leak.

Warren, can you review?
Can I get a cvs diff -c so that I can see some context? Thanks.
Just as an FYI, this leak will soon be the largest single source of noise in 
Purify for mozilla-bin startup/shutdown.  I might even be able to switch my 
efforts to mozilla-bin away from viewer (which stands at 4 bytes for 
startup/shutdown) soon.

If you still really need a -c patch, I could apply shaver's patch here and 
generate that diff.
Yeah, there's lots of things I _could_ do...
This doesn't build for me on gcc 2.7.2.3:
/space/mozilla/SunOS_5.6_clobber/mozilla/xpfe/appshell/src/nsAppShell
          Service.cpp:176: jump to label `done'
/space/mozilla/SunOS_5.6_clobber/mozilla/xpfe/appshell/src/nsAppShell
          Service.cpp:143:   crosses initialization of `class
          nsCOMPtr<nsIMetaCharsetService> metacharset'
OK, I'll fix that and attach a new version.

Sorry about the patch format; my .cvsrc hasn't migrated to the laptop yet.
Assignee: warren → shaver
Stole the .h patch from one of the earlier patches and the new patch for .cpp 
built fine on Solaris with gcc 2.7.2.3.
Looks like it works for bruce now, too.  Warren, can you review?
Looks good. I didn't try to run it though.

Warren
It ran fine for me here under Purify.  No new errors and the memory leak appears 
to be gone gone gone.
Fixed.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
And verified.
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.