http://d.puremagic.com/issues/show_bug.cgi?id=8875
Maxim Fomin <ma...@maxim-fomin.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ma...@maxim-fomin.ru Resolution| |INVALID --- Comment #2 from Maxim Fomin <ma...@maxim-fomin.ru> 2012-10-26 08:51:43 PDT --- (In reply to comment #0) > 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. AFAIK D garbage collector is non-reenterable. When a program returns from main function and GC collects objects, destructors should not perform gc-related operations because it will result in InvalidMemoryOperationError. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------