Only call gc once in child threads