check gc after allocation
some old java code