Okay, i’m cool with having virtual destructors so that an array of pointers to a base type is able to happily delete subclassed type objects.
But i’m a little wary of using OwnedArray - for now i’m using an Array of the base type, and when removing an object i delete it then remove the pointer from the array. Logically i assume OwnedArray will be fine, but i wasn’t sure if it did some internal magic using the size of the specified type (i.e. a subclass object will have more data in it than the base object and thus be bigger). Is this not actually a problem for OwnedArray? I’d like to leave the array to do the deleting for me, but of course i’m just a little concerned that it may not like being given subclass type objects.