How to clear those Handle type objects after they are created by new operation?

For example, the follow codes:
TopoDS_Shape aTopoShape;
Handle_AIS_Shape aAisShape=new AIS_Shape(aTopoShape);
The question is that: Is there needs for me to delete aAisShape which is Handle type by manual in my destructor function? If not, will memory leak happen?

Bearloga's picture

It would be better to search this forum on this subject, it definitely has answers to your question, see e.g.: