1 like
·
119 reads
2 comments
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.
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.