 package com.threerings.presents.dobj {
 
 import flash.events.EventDispatcher;
-
-import mx.collections.ArrayCollection;
 
 import com.threerings.util.ClassUtil;
 import com.threerings.util.StringBuilder;

        if (_subscribers == null) {
            return;
        }
        var dex :int = _subscribers.getItemIndex(sub);
        if (dex != -1) {
            _subscribers.removeItemAt(dex);
            if (_subscribers.length == 0) {
                _omgr.removedLastSubscriber(this, _deathWish);
            }

    public function addListener (listener :ChangeListener) :void
    {
        if (_listeners == null) {
            _listeners = [ ];

        } else if (_listeners.indexOf(listener) != -1) {
            log.warning("Refusing repeat listener registration " +
                "[dobj=" + which() + ", list=" + listener + "].");
            log.logStackTrace(new Error());
            return;
        }
        _listeners.push(listener);
    }

    public function removeListener (listener :ChangeListener) :void
    {
        if (_listeners != null) {
            var dex :int = _listeners.indexOf(listener);
            if (dex != -1) {
                _listeners.splice(dex, 1);
            }
        }
    }
