Allow classes to specify stack or heap allocation