[Issue 18811] New: root/array.d leaks

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 29 13:54:20 UTC 2018


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

          Issue ID: 18811
           Summary: root/array.d leaks
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alphaglosined at gmail.com

With -version=GC root/array.d will leak memory.
But only when dim is 1.

This is because it is putting it into smallarray, instead of allocating memory.

It can be verified by setting SMALLARRAYCAP to 0 and removing the if statement
in the destructor.

During my testing with dmd as a library it will result in ~0.5mb leakage. The
test cases were small, but in much larger cases this could be quite serious for
reusability.

This could be a by product of other issues, I do not know.

--


More information about the Digitalmars-d-bugs mailing list