Skip to content

[BUG] EventMap -> removeAllForDispatcher #21

@commovere

Description

@commovere
public function removeAllForDispatcher(target:EventDispatcher):void
        {
            for (var index:int = map.length - 1; index >= 0; index++)
            {
                var mapping:Object = map[index];

                if (mapping.target == target)
                {
                    map.splice(index, 1);
                }
            }
        }

should be

public function removeAllForDispatcher(target:EventDispatcher):void {
        for (var index:int = map.length - 1; index >= 0; index--) {
            var obj:Object = map[index];

            if (obj.target == target) {
                obj.target.removeEventListener(obj.event, obj.handler);
                map.splice(index, 1);
            }
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions