Thread overview
[Issue 924] New: GC collects valid objects
Feb 03, 2007
d-bugmail
Feb 12, 2007
d-bugmail
Feb 15, 2007
d-bugmail
February 03, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=924

           Summary: GC collects valid objects
           Product: D
           Version: 1.004
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: benoit@tionex.de


This problem occurs, if an array is initialized with the static initializer:

import std.gc;
extern(C) int printf( char*, ... );
class C{
    ~this(){
        printf( "DTor()\n" );
    }
}
C[] carr;
void setup(){
    carr = [ new C, new C];
}
void main(){
    setup();
    fullCollect();
    printf( "complete\n" );
}
// expected output
complete
DTor()
DTor()
// but it is
DTor()
DTor()
complete


-- 

February 12, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=924


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla@digitalmars.com  2007-02-12 03:46 -------
Fixed DMD 1.005


-- 

February 15, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=924





------- Comment #2 from thomas-dloop@kuehne.cn  2007-02-15 03:42 -------
Added to DStress as http://dstress.kuehne.cn/run/m/memory_management_06_A.d


--