[Issue 8875] New: can't remove() in case of static associated array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 22 20:37:41 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8875

           Summary: can't remove() in case of static associated array
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: hotcocoamix at gmail.com


--- Comment #0 from hotcocoamix at gmail.com 2012-10-22 20:37:40 PDT ---
example code ( no error ):

void main(){
    C c;
    c = new C(0);
    delete c;
}
class C{
    static int[int] staticList;
    int myint;

    this( int x ){
        staticList[x] = 1;
        myint = x;
    }
    ~this(){
        staticList.remove( myint );
    }
}

BUT comment out "delete c;" , freeze by end of runtime.

in addition,
code that only refer to staticList did'nt freeze.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list