Drawbacks of exceptions being globally allocated
Paul Backus
snarwin at gmail.com
Mon Aug 16 02:37:29 UTC 2021
On Monday, 16 August 2021 at 02:26:04 UTC, Tejas wrote:
>
> Agh >_<
>
> if I remove the `scope`and replace it with `auto`?
> No longer having anything to do with the stack or RAII, just
> using malloc + emplace instead of GC?
>
> Yeah it might leak memory unless the catch block explicitly
> frees the exception object, but other than that?
Yeah, other than needing to manually free the exception it should
be fine.
Though at that point, you might just be better off using
statically-allocated exceptions.
More information about the Digitalmars-d-learn
mailing list