Why do you create so many objects in heap instead of on stack?