[Issue 21324] New: @live not detecting overwrite of Owner without disposing of previous owned value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 18 07:42:31 UTC 2020


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

          Issue ID: 21324
           Summary: @live not detecting overwrite of Owner without
                    disposing of previous owned value
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

int* malloc();
void free(int*);

@live void test()
{
    int* p = malloc();
    p = malloc();  // does not detect reassignment of owner
    free(p);
}

--


More information about the Digitalmars-d-bugs mailing list