---
title: "Discussion on \"Memory Leaks\" | Hashnode"
description: "Discussion on \"Memory Leaks\". Computers do a variety of things, you can play games, see movies, and converse with your loved ones and folks you hate (Twitter). In our case, we write programs that shape the human experience and at the heart of all this is the simple idea of an inp..."
url: "https://hashnode.com/posts/memory-leaks/6415aeeff94a99cca7bd62d1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Memory Leaks](https://debayotomisin.hashnode.dev/memory-leaks?utm_source=hashnode&utm_medium=feed)

Computers do a variety of things, you can play games, see movies, and converse with your loved ones and folks you hate (Twitter). In our case, we write programs that shape the human experience and at the heart of all this is the simple idea of an inp...

Mar 18, 2023 · 5 min read · debayotomisin.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#memory-management](https://hashnode.com/tag/memory-management)
-   [#memory-leaks](https://hashnode.com/tag/memory-leaks)

## Written by

[Adebayo Oluwatosin](https://hashnode.com/@DebayoTomisin007)

@DebayoTomisin007 · Akure, Nigeria

  
[View profile](https://hashnode.com/@DebayoTomisin007)

Software Engineer and Architect. I love to tinker with systems and build products.

## Responses 1

Markdown supported · ⌘↵ to post

[Anthony Fung](https://hashnode.com/@anthonyf)

[Mar 18, 2023](https://hashnode.com/posts/memory-leaks/6415aeeff94a99cca7bd62d1/comment/6415b62abc961bc7aa5980f9)

Great explanation of the subject!

Another subtle cause of memory leaks is attaching event handlers either in a loop, or forgetting to detach them before re-adding them.

Similar to your analogy with the new house, there's something called Broken Windows Theory that could be adapted and applied to this situation. The premise is that because there is a memory leak and nobody fixes it, it gives the impression that it's ok to leave memory leaks in the software. This means that other maintainers of the software also leave their memory leaks, which exacerbates the problem with a snowballing effect.

[Adebayo Oluwatosin](https://hashnode.com/@DebayoTomisin007)

[Mar 18, 2023](https://hashnode.com/posts/memory-leaks/6415aeeff94a99cca7bd62d1/comment/6415b62abc961bc7aa5980f9#reply-6415b894bc961bc7aa598176)

Thank you for the further explanation. I am very familiar with the broken windows theory, that's the inspiration for the analogy. Again, thank you.
