Closed Bug 709498 Opened 13 years ago Closed 13 years ago

if type is undefined for EventEmitter._removeAllListeners then all listeners should be removed

Categories

(Add-on SDK Graveyard :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: erikvvold, Assigned: erikvvold)

Details

Attachments

(1 file)

There appears to be some pieces of code that are not removing all listeners in destructors which can cause memory leaks.

So instead of having destructors loop through possible types and remove all listeners for those types, why not have the option of removing all listeners regardless of type?
Assignee: nobody → erikvvold
Pointer to Github pull-request
Attachment #580668 - Flags: review?(myk)
Status: NEW → ASSIGNED
Comment on attachment 580668 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/298

Great idea, and the patch looks great; r=@mykmelez!
Attachment #580668 - Flags: review?(myk) → review+
Commit pushed to https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/f1ac348d95175ce41fd7b007ab768921f3acfd26
Merge pull request #298 from erikvold/bug-709498

fix Bug 709498 - EventEmitter._removeAllListeners no longer requires a type argument; r=@mykmelez
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: