Drawbacks of exceptions being globally allocated
Tejas
notrealemail at gmail.com
Sun Aug 15 02:09:08 UTC 2021
On Sunday, 15 August 2021 at 00:15:32 UTC, Ali Çehreli wrote:
> On 8/14/21 4:41 AM, Tejas wrote:
>
> > [...]
> exception
> > [...]
>
> So, there would be many exception objects one for each place
> that an exception can be thrown. Functions like enforce() would
> have to take a reference to the exception object that is
> associated with that local scope.
>
> [...]
I just want ```@nogc``` exceptions ;_;
Please tell me that the ```GC.stats``` thing I posted is
irrelevant so that I can go back to using ```emplace```.
I wanted to allocate a class on the heap without being forced to
use templates... but I guess that simply isn't possible(I know I
can use ```mixin```, but that's even worse).
More information about the Digitalmars-d-learn
mailing list