[Bug Report] Base class does not have virtual destructor

Hanz
Posts: 14
Joined: Fri Jun 01, 2007 5:36 am

[Bug Report] Base class does not have virtual destructor

Post by Hanz »

There is really a minor bug:

In btGIMPACTMeshShape.h, we have following class definition:

Code: Select all


class BT_GIMPACT_TRIMESH_DATA_HANDLE_ARRAY: public btAlignedObjectArray<BT_GIMPACT_TRIMESH_DATA_HANDLE>
{
public:
   
};

However, the base template class btAlignedObjectArray's destructor
is not virtual.

Usually it does not matter since we seldom use base class pointer for
a derived container class object, but it is better add the virtual destructor
or simply replace above class definition with a typedef:

Code: Select all


typedef btAlignedObjectArray<BT_GIMPACT_TRIMESH_DATA_HANDLE>
BT_GIMPACT_TRIMESH_DATA_HANDLE_ARRAY;