Last active
December 17, 2015 10:58
-
-
Save meleyal/5598689 to your computer and use it in GitHub Desktop.
Tools for debugging memory leaks
This file contains 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
# Get all the jQuery bound events on an element: | |
console.log $._data(el, 'events') | |
# Create and remove multiple instances of a view: | |
window.installTest = -> | |
views = [] | |
viewClass = MyView | |
options = {} | |
views.push(new viewClass(options)) for i in [0...500] | |
view.remove() for view in views | |
views = [] | |
console.log "#{viewClass.name} installed and removed x #{i}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment