This project has moved and is read-only. For the latest updates, please go here.

Model, ModelMesh, ModelMeshParts are missing virtual destructor.

Aug 4, 2015 at 12:05 PM
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 5, 2015 at 12:07 AM
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 1:03 AM
Fixed with changeset 260429728f4b
Marked as answer by walbourn on 8/4/2015 at 5:03 PM
Aug 5, 2015 at 12:55 PM
That will help me a lot.