It has been confirmed about the leaks, it was because of the material and texture vectors.
alnite, it still doesn't work.
But I am in doubt, while in the destroyMeshContainer method, the pMeshContainerBase is downcasted to BoneMesh.
That means that extra components in BoneMesh need to be taken care of.
Another thing is the original book has a texture attached with the sample. It was correctly loaded everytime the program runs.
Now I am using a mesh that doesn't have a texture....
I also find a 8-bytes-short memory allocation....
tried to delete the skinned mesh first, then the device to no avail