Best memory management D idioms

Eugene Wissner via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 7 12:30:33 PST 2017


On Tuesday, 7 March 2017 at 20:15:37 UTC, XavierAP wrote:
> On Tuesday, 7 March 2017 at 18:21:43 UTC, Eugene Wissner wrote:
>> To avoid this from the beginning, it may be better to use 
>> allocators. You can use "make" and "dispose" from 
>> std.experimental.allocator the same way as New/Delete.
>
> Thanks! looking into it.
>
> Does std.experimental.allocator have a leak debugging tool like 
> dlib's printMemoryLog()?

Yes, but printMemoryLog is anyway useful only for simple 
searching for memory leaks. For the advanced debugging it is 
anyway better to learn some memory debugger or profiler.


More information about the Digitalmars-d-learn mailing list