You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VoxelComplex publicly inheritates from CombicalComplex but the later class is not designed for this: its destructor should be virtual so that to guarantee that a VoxelComplex object is correctly destroyed in all cases. In particular, in case of polymorphism, the destructor of the attributes of VoxelComplex will not be called thus leading to potential memory leak (attributes are CountedPtrOrPtr).
VoxelComplex
publicly inheritates fromCombicalComplex
but the later class is not designed for this: its destructor should bevirtual
so that to guarantee that aVoxelComplex
object is correctly destroyed in all cases. In particular, in case of polymorphism, the destructor of the attributes ofVoxelComplex
will not be called thus leading to potential memory leak (attributes areCountedPtrOrPtr
).Simple example:
that outputs:
but with a
virtual
CubicalComplex
destuctor:The text was updated successfully, but these errors were encountered: