Can't I allocate at descontructor?
Ali Çehreli
acehreli at yahoo.com
Fri Mar 5 21:25:52 UTC 2021
On 3/5/21 12:57 PM, Jack wrote:
>> destroy() executes the destructor.
>
> but I would need to call it manually and only after I somewhat I've
> determined I no longer need the resources, right? so destroy(c) would be
> no different from calling my own finalize-like method like
freeResources()?
Yes but perhaps with some extra functionality like the optional
'initialize':
https://dlang.org/phobos/object.html#.destroy
Ali
More information about the Digitalmars-d-learn
mailing list