RFC: reference counted Throwable

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 09:48:46 PDT 2014


On 9/20/14, 7:31 AM, Adam D. Ruppe wrote:
> How often do you store an exception reference anyway that escapes a
> catch block? I think all this talk is overkill to solve a non-problem in
> 99% of practice.
>
>
> Correct me if I'm wrong, but aren't *all* exceptions in a particular
> thread generally unreferenced at the end of a catch() block, unless the
> programmer explicitly escaped that reference?
>
> If so, we don't need refcounting! Here's my solution:
[snip]

Thanks. I personally favor RC based on malloc to this. It'll be safer 
and simpler to use. -- Andrei




More information about the Digitalmars-d mailing list