April 14, 2005 Exceptions part 2: Incomplete objects | ||||
---|---|---|---|---|
| ||||
# /* # This example demonstrates that the dtors of incomplete # objects are called during a GC run. # */ # # import std.c.stdio; # import std.gc; # # class IC # { # this() # { # printf( "IC ctor\n" ); # throw new Exception( "IC Exception" ); # } # # ~this() # { # printf( "IC dtor\n" ); # } # } # # void main() # { # try # { # IC ic = new IC(); # printf( "success\n" ); # } # catch( Exception e ) # { # printf( "fail: %.*s\n", e.toString() ); # } # fullCollect(); # printf( "done\n" ); # } |
April 14, 2005 Re: Exceptions part 2: Incomplete objects | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Oops, wrong forum. I hit "back" one too many times. Sean |
Copyright © 1999-2021 by the D Language Foundation