memory-leak-examples
memory-leak-examples copied to clipboard
willDestroy should be willDestoryElement
I'm not sure if both will work, just noticed it was inconsistent with ember docs
https://guides.emberjs.com/v3.0.0/components/the-component-lifecycle/#toc_detaching-and-tearing-down-component-elements-with-code-willdestroyelement-code
Both are fine (as the tutorial here is definitely correct), but I believe willDestroyElement is now the preferred method. willDestroy is still a public method in the component API through v3.0. We can probably should update the tutorial to use willDestroyElement to keep it inline with the rest of the community best practices.