allocObject (+test)