<story><title>So We&apos;ve Got a Memory Leak</title><url>https://stevenharman.net/so-we-have-a-memory-leak</url></story><parent_chain><item><author>pavlov</author><text>Never calling free() is a valid memory management strategy if you know your process lifetime exactly.</text></item><item><author>DonHopkins</author><text>&amp;quot;I&amp;#x27;m not a real programmer. I throw together things until it works then I move on. The real programmers will say &amp;#x27;Yeah it works but you&amp;#x27;re leaking memory everywhere. Perhaps we should fix that.&amp;#x27; I’ll just restart Apache every 10 requests.&amp;quot; -Rasmus Lerdorf, PHP Non-Designer&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikiquote.org&amp;#x2F;wiki&amp;#x2F;Rasmus_Lerdorf&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikiquote.org&amp;#x2F;wiki&amp;#x2F;Rasmus_Lerdorf&lt;/a&gt;</text></item></parent_chain><comment><author>iveqy</author><text>Git is actually using that approach which means that libgit is pretty useless to embed, which noone does anyway since it&amp;#x27;s GPL and everyone instead uses libgit2.</text></comment>
<story><title>So We&apos;ve Got a Memory Leak</title><url>https://stevenharman.net/so-we-have-a-memory-leak</url></story><parent_chain><item><author>pavlov</author><text>Never calling free() is a valid memory management strategy if you know your process lifetime exactly.</text></item><item><author>DonHopkins</author><text>&amp;quot;I&amp;#x27;m not a real programmer. I throw together things until it works then I move on. The real programmers will say &amp;#x27;Yeah it works but you&amp;#x27;re leaking memory everywhere. Perhaps we should fix that.&amp;#x27; I’ll just restart Apache every 10 requests.&amp;quot; -Rasmus Lerdorf, PHP Non-Designer&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikiquote.org&amp;#x2F;wiki&amp;#x2F;Rasmus_Lerdorf&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikiquote.org&amp;#x2F;wiki&amp;#x2F;Rasmus_Lerdorf&lt;/a&gt;</text></item></parent_chain><comment><author>rwmj</author><text>I tried to do this in a real program once.  The program only ever runs for a fraction of a second and then exits, so it seemed like a good candidate.  Unfortunately what happened after is that our company started running tools like Coverity which complained about leaked memory.  The path of least resistance was to fix that by adding free()&amp;#x27;s everywhere.</text></comment>