Call destructor directly.
Dicebot
public at dicebot.lv
Mon Oct 21 04:54:22 PDT 2013
On Monday, 21 October 2013 at 11:48:11 UTC, Benjamin Thaut wrote:
> Using destroy will zero the entire memory block after
> destroying the object. If you are freeing the memory right
> after destroying this is going to cost you performance.
>
> To avoid this declare:
>
> extern (C) void rt_finalize2(void* p, bool det = true, bool
> resetMemory = true);
It is probably a good idea to use malloc/free for deterministic
allocators anyway as GC is not really supposed to be used that
way by design.
More information about the Digitalmars-d-learn
mailing list