Memory leak in foreach

Andrea Fontana nospam at example.org
Wed Feb 20 16:22:51 UTC 2019


On Wednesday, 20 February 2019 at 15:53:54 UTC, H. S. Teoh wrote:
> P.S. And BTW, this bug is not directly related to memory leaks. 
> It relates to the dtor not being called when it should be.  
> Whether or not it's a memory leak depends on what the dtor is 
> doing (e.g. it may be leaking other resources than memory).  In 
> your PR / bugzilla issue you should probably phrase it in terms 
> of dtors rather than memory leaks, which may cause 
> misunderstandings.
>
>
> T

You're right. Indeed I found this bug checking for non-released 
resources.


More information about the Digitalmars-d mailing list