Implement object allocation with garbage collector