I need to store an array of object of custom type. I wonder what would be the benefit of storing them in
OwnedArray instead of in a
std::vector? What are the use cases that
OwnedArray is the top choice?
I can store my custom type as:
I am aware that the
OwnedArray stores a list of pointer and will take care of deleting them in its destructor. But it’s unclear to me when is it more sensible to use it instead of the typical