diff tangotests/mem5.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/mem5.d	Wed May 14 01:22:40 2008 +0200
@@ -0,0 +1,24 @@
+module tangotests.mem5;
+
+class SC
+{
+    int* ip;
+    this()
+    {
+        ip = new int;
+    }
+    ~this()
+    {
+        delete ip;
+    }
+    void check()
+    {
+        assert(ip !is null);
+    }
+}
+
+void main()
+{
+    scope sc = new SC;
+    sc.check();
+}