Mercurial > projects > dstress
diff run/align_10.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_10.d Fri Mar 25 07:33:35 2005 +0000 @@ -0,0 +1,39 @@ +// $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_10; + +import std.gc; + +struct S{ + char[] font_face; + byte charset; +} + +int main(){ + S[] x; + + S s; + s.font_face="font face".dup; + x ~= s; + s.font_face="font face".dup; + x ~= s; + s.font_face="font face".dup; + x ~= 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