koan icon indicating copy to clipboard operation
koan copied to clipboard

post ws notification is received multiple times after you destroy the controller

Open alleles opened this issue 7 years ago • 2 comments

the $onDestroy function is being overwritten each time you subscribe within a controller.. which means only the last subscription you make is actually getting destroyed..

i have a fix.. will put in a PR

ty for this project.. i've literally been using it for years for all sorts of POCs..

alleles avatar Apr 11 '18 21:04 alleles

fixed commit here:

https://github.com/alleles/koan/commit/0e8c4e17412e0cae55be52d4b6a2cf7193bc1eb2 cheers!

alleles avatar Apr 11 '18 21:04 alleles

Good point. I may include this in the next release with package updates. Or I might remove the entire memory leak protection code and make a comment linking to your commit, just to keep the example as simple as possible.

Thanks for the contribution!

soygul avatar Apr 16 '18 07:04 soygul