diff run/align_08.d @ 363:56eae111e8ef

struct alignment / gc Ben Hinkle <bhinkle@mathworks.com> 2005-03-23 news:d1s5gs$2odc$1@digitaldaemon.com
author thomask
date Fri, 25 Mar 2005 07:33:35 +0000
parents
children b8c0195059d9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/align_08.d	Fri Mar 25 07:33:35 2005 +0000
@@ -0,0 +1,34 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Ben Hinkle <bhinkle@mathworks.com>
+// @date@	2005-03-23
+// @uri@	news:d1s5gs$2odc$1@digitaldaemon.com
+
+// @WARNING@	imports Phobos' gc
+
+module dstress.run.align_08;
+
+import std.gc;
+
+struct S{
+	char[] font_face;
+}
+
+int main(){
+	S[] x;
+
+	for (int i=0;i<3;i++) {
+		S s;
+		s.font_face="font face".dup;
+		x ~= s;
+	}
+
+	fullCollect();
+
+	assert(x[0].font_face=="font face");
+	assert(x[1].font_face=="font face");
+
+	return 0;
+}
\ No newline at end of file