-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Description
cocos/3d/CCBundle3DData.h
has a few structure storing 3D data. But some comes with virtual destructor, some doesn't.
struct ModelData
{
std::string subMeshId;
std::string materialId;
std::vector<std::string> bones;
std::vector<Mat4> invBindPose;
virtual ~ModelData()
{
resetData();
}
virtual void resetData()
{
bones.clear();
invBindPose.clear();
}
};
struct MeshDatas
{
std::vector<MeshData*> meshDatas;
void resetData()
{
for(auto& it : meshDatas)
{
delete it;
}
meshDatas.clear();
}
~MeshDatas()
{
resetData();
}
};
And no class seems to inherit from struct ModelData
. Is it a mistake to include virtual
keyword?
@minggo If you think virtual
is unnecessary, I will remove it.
Metadata
Metadata
Assignees
Labels
No labels