view tests/mini/gc_datasegment.d @ 1651:cb960b882ca3 default tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
parents d159da5201f1
children
line wrap: on
line source

extern(C) void gc_collect();

class C
{
  int i = 42;
}

C data;

void main()
{
  data = new C;
  gc_collect();
  assert(data.i == 42);
}