Separated resource allocation and initialization