On Friday, 5 March 2021 at 21:25:52 UTC, Ali Çehreli wrote:
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

Now about the behavior of a static destructor, like static ~this() { } is this guaranteed to be run?

Reply via email to