Mercurial > projects > ldc
view tangotests/mem4.d @ 309:d59c363fccad trunk
[svn r330] Implemented synchronized statements.
Changed the tryfinally handlers to a more generalized EnclosingHandler.
Changed ClassInfoS to be mutable so they can be used as locks.
Added new BB after throw ala return/break etc.
author | lindquist |
---|---|
date | Sat, 28 Jun 2008 11:37:53 +0200 |
parents | c4c9b4ac021b |
children |
line wrap: on
line source
module tangotests.mem4; import tango.stdc.stdio; class C { int* ptr; this() { printf("this()\n"); ptr = new int; } ~this() { printf("~this()\n"); delete ptr; assert(ptr is null); } final void check() { printf("check()\n"); assert(ptr !is null); } } void main() { C c = new C(); c.check(); delete c; assert(c is null); }