Bug 924 – GC collects valid objects

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-02-02T18:54:00Z
Last change time
2014-02-16T15:22:52Z
Assigned to
bugzilla
Creator
benoit

Comments

Comment #0 by benoit — 2007-02-02T18:54:01Z
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
Comment #1 by bugzilla — 2007-02-12T03:46:47Z
Fixed DMD 1.005
Comment #2 by thomas-dloop — 2007-02-15T03:42:33Z