<html>
...
<script src="rx.all.js"></script>
<script src="leaks.js"></script>
...
</html>
While running Leak$ will continuiously print the current number of subscriptions to the console.
If this number tends to grow more than shrink then there is almost certaintly a subscription leak.
window.leaks.trace = true
- Do user interaction (get your observers to subscribe to their sources)
window.leaks.trace = false
- Do user interaction to get back to previous state (unsubscribe the observers)
window.leaks.stacks
now contains stack traces of observers that didn't unsubscribewindow.leaks.pushError()
will send a LeakError to observers that didn't unsubscribe