Model, ModelMesh, ModelMeshParts are missing virtual destructor.

Aug 4, 2015 at 11:05 AM
I'm wondering why these classes miss virtual destructor and methods. I'm writing some transparency support on top of DirectX::Model class and it is much harder to do it. Was it done by purpose? Is there a chance that it will be changed in future releases?

Aug 4, 2015 at 11:07 PM
By in large, DirectX Tool Kit classes are not designed to be derived from. Most of them use the pImpl idiom which would not work well for derivation. We do use the abstract base class as an interface in a few places.

Model is designed without pImpl to make it easier to write other loaders and complex rendering leveraging the loaders for other purposes.

Reviewing the code I see we use virtual destructors in many of our classes, but we aren't consistent about it. I'll make a pass to fix that.
Aug 5, 2015 at 12:03 AM
Fixed with changeset 260429728f4b
Marked as answer by walbourn on 8/4/2015 at 5:03 PM
Aug 5, 2015 at 11:55 AM
That will help me a lot.