See bug 168411 comment #28. Gavin reports that if the factory is in the same object as the module, we leak. This is exactly how some of our component registration is done. (see for example http://landfill.mozilla.org/mxr-test/mozilla/source/calendar/providers/caldav/calDavCalendar.js#904 ) For an example of what we should do, see http://lxr.mozilla.org/mozilla1.8/source/browser/components/search/nsSearchService.js#2290
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody
Created attachment 281463 [details] [diff] [review] [checked in] define factory method outside the module, rev0
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #281463 - Flags: review?(daniel.boelzle)
Comment on attachment 281463 [details] [diff] [review] [checked in] define factory method outside the module, rev0 looks good, thanks for the patch; r=dbo
Attachment #281463 - Flags: review?(daniel.boelzle) → review+
Whiteboard: [good first bug] → [good first bug][checkin-needed after 0.7]
Whiteboard: [good first bug][checkin-needed after 0.7] → [good first bug]
Assignee: ssitter → nobody
Status: ASSIGNED → NEW
Whiteboard: [good first bug]
Is there an updated status for this bug? (I'm not sure if the patch was ever checked in...)
The patch seems to be checked in, but we do have a few locations where the factory is at least created from inside the module (i.e our createFactoryFor methods). It would be nice to find out if this still causes a leak on 1.9.x or if it was fixed in the meanwhile.
While you are at it, you could also make sure the calItemModule's module correctly implements unregisterSelf(). Seems this does no harm at the moment, but we should be future proof.
Whiteboard: [not needed beta][no l10n impact]
The rest of this is obsolete by bug 576746, marking FIXED since a patch was checked in for this bug.
Assignee: mschroeder → ssitter
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.