www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15509] New: IAllocator must be exposed via a reference

https://issues.dlang.org/show_bug.cgi?id=15509

          Issue ID: 15509
           Summary: IAllocator must be exposed via a reference counted
                    struct
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Currently any entity may stash away an IAllocator reference without any
accounting. This makes it impossible to e.g. detect whether a stack-allocated
region goes out of scope with outstanding references to it.

We need to wrap the IAllocator interface in a reference counted struct that
offers the same primitives.

--
Jan 03 2016