February 10, 2014 Call destructor before memory is freed. | ||||
---|---|---|---|---|
| ||||
I'm writing a freelist for storing structs in which memory is kept around after it is explicitly "freed" by the client. I'm using std.conv.emplace with manual memory management, but I need to call the destructor on the memory right when the caller tries to free. |
February 10, 2014 Re: Call destructor before memory is freed. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ty Overby | On 02/10/2014 02:02 PM, Ty Overby wrote:
> I'm writing a freelist for storing structs in which memory is kept
> around after it is explicitly "freed" by the client. I'm using
> std.conv.emplace with manual memory management, but I need to call the
> destructor on the memory right when the caller tries to free.
o.destroy()
Ali
|
Copyright © 1999-2021 by the D Language Foundation