destroy and @safe

Adam D Ruppe destructionator at gmail.com
Tue Jun 21 15:18:26 UTC 2022


On Tuesday, 21 June 2022 at 15:13:36 UTC, Paul Backus wrote:
> `destroy` should be `@safe` as long as the destructor it's 
> calling is `@safe`.

For classes, the current dmd+druntime implementation makes it 
impossible to determine statically if the destructor is safe or 
not.

Structs I'm not sure about, the implementation might block it 
there too but idk.


More information about the Digitalmars-d-learn mailing list