2 ms·
"Blindly overusing most features in frameworks or libraries can cause performance problems. Which memory leaks?" Binding to event emitted by an object on anoth
by eyko 12y ago
"Blindly overusing most features in frameworks or libraries can cause performance problems. Which memory leaks?"
Binding to event emitted by an object on another object, then deleting the receiver, can cause a memory leak if you don't unbind first.
- yummybear 12y agoTrue, but hardly unique to Angular.
- rubicon33 12y agoiOS has the exact same situation for it's notifications framework (essentially, observer pattern). From what I've seen, consistently across frameworks that support the pattern, that you need to de-register your listener before releasing it from memory. Pretty funny to think, I'm a "junior" developer and even I know that you have great power, but also responsibility, in the observer pattern.