im sure c++ addresses the issue in some weird c++ way, then
it doesn't, that's what I'm saying - it just calls the object's destructor, which is "just" a pointer to a function. The one subtlety is that subclasses have different destructors from their parent class, so each element of the array can have a different function that needs to be called. You can handle that by just adding a layer of indirection, though - one function that checks what type of object it got, and decides which function to delegate to. C++ does that through an implicit vtable, but CPython does that sort of thing explicitly via an indirection through the object's type's slots