diff tangotests/mem2.d @ 209:c4c9b4ac021b trunk

[svn r225] Fixed: delete expressions no longer use llvm's free instruction, which crashes on a GC provided pointer.
author lindquist
date Wed, 14 May 2008 01:22:40 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tangotests/mem2.d	Wed May 14 01:22:40 2008 +0200
@@ -0,0 +1,11 @@
+module tangotests.mem2;
+
+void main()
+{
+    int* ip = new int;
+    assert(*ip == 0);
+    *ip = 4;
+    assert(*ip == 4);
+    delete ip;
+    assert(ip is null);
+}