lib/observe-shim.js
function _cleanObserver(observer) {
        if (!attachedNotifierCountMap.get(observer) && !pendingChangesMap.has(observer)) {
            attachedNotifierCountMap.delete(observer);
            var index = observerCallbacks.indexOf(observer);
            if (index !== -1) {
                observerCallbacks.splice(index, 1);
            }
        }
    }
function _cleanObserver(observer) {
        if (!attachedNotifierCountMap.get(observer) && !pendingChangesMap.has(observer)) {
            attachedNotifierCountMap.delete(observer);
            var index = observerCallbacks.indexOf(observer);
            if (index !== -1) {
                observerCallbacks.splice(index, 1);
            }
        }
    }
function _cleanObserver ( observer ) { if ( ! attachedNotifierCountMap . get ( observer ) && ! pendingChangesMap . has ( observer ) ) { attachedNotifierCountMap . delete ( observer ) ; var index = observerCallbacks . indexOf ( observer ) ; if ( index !== - 1 ) { observerCallbacks . splice ( index , 1 ) ; } } }
Remove reference all reference to an observer callback, if this one is not used anymore. In the proposal the ObserverCallBack has a weak reference over observers, Without this possibility we need to clean this list to avoid memory leak
Remove reference all reference to an observer callback if this one is not used anymore . In the proposal the ObserverCallBack has a weak reference over observers Without this possibility we need to clean this list to avoid memory leak