its quite possible, trough polymorphism, you store either a pointer to a commonly inherited base object, or make a base that stores the delegated object on the heap.