List of Phobos functions that allocate memory?
Johannes Pfau
nospam at example.com
Thu Feb 6 11:02:28 PST 2014
Am Thu, 6 Feb 2014 20:00:50 +0100
schrieb Johannes Pfau <nospam at example.com>:
> Am Thu, 06 Feb 2014 18:52:20 +0000
> schrieb "fra" <a at b.it>:
>
> > On Thursday, 6 February 2014 at 18:20:56 UTC, Andrei Alexandrescu
> > wrote:
> > >> One interesting point is that module that were written with
> > >> avoiding
> > >> allocations in mind usually still allocate when throwing
> > >> exceptions.
> > >
> > > Good point, we need to address that as well.
> > >
> > >
> > > Andrei
> >
> > Hey, wait a second. How do you throw without allocating?
> >
>
> You can store the exception as a global and that's done for the
> OutOfMemoryError IIRC, but what I meant was 'allocate with the GC'.
Oh and in other languages you can throw by value but I think that
wouldn't work in D because of exception chaining.
More information about the Digitalmars-d
mailing list