can-bind.js
function turnOffListeningAndUpdate(listenToObservable, updateObservable, updateFunction, queue) {
	var offValueOrOffEmitFn;

	// Use either offValue or offEmit depending on which Symbols are on the `observable`
	if (listenToObservable[onValueSymbol]) {
		offValueOrOffEmitFn = canReflect.offValue;
	} else if (listenToObservable[onEmitSymbol]) {
		offValueOrOffEmitFn = offEmit;
	}

	if (offValueOrOffEmitFn) {
		offValueOrOffEmitFn(listenToObservable, updateFunction, queue);

		//!steal-remove-start
		if(process.env.NODE_ENV !== 'production') {

			// The updateObservable is no longer mutated by listenToObservable
			canReflectDeps.deleteMutatedBy(updateObservable, listenToObservable);

			// The updateFunction no longer mutates anything
			updateFunction[getChangesSymbol] = function getChangesDependencyRecord() {
			};

		}
		//!steal-remove-end
	}
}
function turnOffListeningAndUpdate(listenToObservable, updateObservable, updateFunction, queue) {
	var offValueOrOffEmitFn;

	// Use either offValue or offEmit depending on which Symbols are on the `observable`
	if (listenToObservable[onValueSymbol]) {
		offValueOrOffEmitFn = canReflect.offValue;
	} else if (listenToObservable[onEmitSymbol]) {
		offValueOrOffEmitFn = offEmit;
	}

	if (offValueOrOffEmitFn) {
		offValueOrOffEmitFn(listenToObservable, updateFunction, queue);

		//!steal-remove-start
		if(process.env.NODE_ENV !== 'production') {

			// The updateObservable is no longer mutated by listenToObservable
			canReflectDeps.deleteMutatedBy(updateObservable, listenToObservable);

			// The updateFunction no longer mutates anything
			updateFunction[getChangesSymbol] = function getChangesDependencyRecord() {
			};

		}
		//!steal-remove-end
	}
}
function turnOffListeningAndUpdate ( listenToObservable , updateObservable , updateFunction , queue ) { var offValueOrOffEmitFn ; // Use either offValue or offEmit depending on which Symbols are on the `observable` if ( listenToObservable [ onValueSymbol ] ) { offValueOrOffEmitFn = canReflect . offValue ; } else if ( listenToObservable [ onEmitSymbol ] ) { offValueOrOffEmitFn = offEmit ; } if ( offValueOrOffEmitFn ) { offValueOrOffEmitFn ( listenToObservable , updateFunction , queue ) ; //!steal-remove-start if ( process . env . NODE_ENV !== 'production' ) { // The updateObservable is no longer mutated by listenToObservable canReflectDeps . deleteMutatedBy ( updateObservable , listenToObservable ) ; // The updateFunction no longer mutates anything updateFunction [ getChangesSymbol ] = function getChangesDependencyRecord ( ) { } ; } //!steal-remove-end } }
Given an observable, stop listening to it and tear down the mutation dependencies
Given an observable stop listening to it and tear down the mutation dependencies