diff --git a/content/blog/async-pipe-is-not-pure/index.md b/content/blog/async-pipe-is-not-pure/index.md index 5bb55ff9..f807d8f0 100644 --- a/content/blog/async-pipe-is-not-pure/index.md +++ b/content/blog/async-pipe-is-not-pure/index.md @@ -134,7 +134,7 @@ The moment we set the **pure** option to be **false**, we tell Angular that we w If we run the code we will see something like this: -![Not working solution](./not_working_example.gif) + The reason why it does that is because every time change detection runs, the pipe will subscribe to our observable and let the other subscription in memory, and of course **create a memory leak**! @@ -166,8 +166,7 @@ transform(obs: Subscribable | null): T | null { If we check the app now, we will see that it works fine! But it’s not finished! -![Working solution](./working_example.gif) - + Because we still cause a memory leak, because we never unsubscribe from the observable! Let’s do it! diff --git a/content/blog/async-pipe-is-not-pure/not_working_example.gif b/content/blog/async-pipe-is-not-pure/not_working_example.gif deleted file mode 100644 index 18b9eeba..00000000 Binary files a/content/blog/async-pipe-is-not-pure/not_working_example.gif and /dev/null differ diff --git a/content/blog/async-pipe-is-not-pure/not_working_example.mp4 b/content/blog/async-pipe-is-not-pure/not_working_example.mp4 new file mode 100644 index 00000000..7855103c Binary files /dev/null and b/content/blog/async-pipe-is-not-pure/not_working_example.mp4 differ diff --git a/content/blog/async-pipe-is-not-pure/working_example.gif b/content/blog/async-pipe-is-not-pure/working_example.gif deleted file mode 100644 index 2b52d5a1..00000000 Binary files a/content/blog/async-pipe-is-not-pure/working_example.gif and /dev/null differ diff --git a/content/blog/async-pipe-is-not-pure/working_example.mp4 b/content/blog/async-pipe-is-not-pure/working_example.mp4 new file mode 100644 index 00000000..4a6bd282 Binary files /dev/null and b/content/blog/async-pipe-is-not-pure/working_example.mp4 differ