Shopping for template languages
matheus
matheus at gmail.com
Thu Aug 8 00:25:16 UTC 2024
On Wednesday, 7 August 2024 at 21:39:06 UTC, An Pham wrote:
> On Wednesday, 7 August 2024 at 20:26:07 UTC, matheus wrote:
>>
>> Anyway, I wish there was a C version or a D option for auto
>> free after end of scope for memory manually allocated for
>> example.
>>
>> Matheus.
>
> No need language feature - here is auto free after scope
> compile with -debug option
>
> ...
Yes I understand that and by the way I used to do the malloc
wrapping in other languages too.
That works, but I would like that as feature by default, because
I could be consuming other source/libraries, and that feature
would prevent leaking.
We just had a similar problem in C# conuming a PDF generator
written in C which on the other hand had a memory leak, in that
case since the lib wasn't ours, the cheap way to solve was
running it inside a process and killed it.
But thanks again for the example, this obvious could be a nice
solution.
Matheus.
More information about the Digitalmars-d
mailing list