On Wed, Jun 08, 2016 at 03:50:26AM +0000, deadalnix via Digitalmars-d wrote: > On Wednesday, 8 June 2016 at 03:45:34 UTC, Jack Stouffer wrote: > > On Wednesday, 8 June 2016 at 03:27:01 UTC, deadalnix wrote: > > > I'm more and more convinced that even RC system should not try to > > > decrement and leak (ie delegate to the GC) when unwinding. > > > > Wouldn't exceptions then still have to be registered to and then > > scanned by the GC? Doesn't that kind of defeat the purpose? > > GC is only a problem when it collects, which won't happen often if you > don't leak that much. Used as a malloc/free, there is no reason for it > to be slower than a malloc/free (a fast malloc already needs to be > able to find the allocation metadata from free's argument > effisciently, so you you got what you need for a GC already).
I thought the usual implementation is to store the metadata immediately before the pointer, so it's O(1) to look it up. T -- Which is worse: ignorance or apathy? Who knows? Who cares? -- Erich Schubert
