Created
September 23, 2014 07:41
-
-
Save brokenseal/d2b5a1b0cad6a77731c5 to your computer and use it in GitHub Desktop.
How to remove all traces of ko subscription from your memory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var self = this; | |
setTimeout(function() { | |
var name; | |
for(name in self){ | |
if(self.hasOwnProperty(name) && self[name] && self[name].dispose && (typeof self[name].dispose == 'function')){ | |
self[name].dispose() | |
} | |
} | |
}, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment