Just use the method Set of AIS_Shape to set a new shape. You may need to call Redisplay(m_hShape) on the InteractiveContext after that.
Archived discussion
About the Handle ???
---------------------------------------------------
TopoDS_Shape aShape = ...;
Handle(AIS_Shape) m_hShape = new AIS_Shape(aShape);
---------------------------------------------------
In my instance, the aShape will be updated ceaselessly and hence the m_hShape also needs to be updated. I am wondering if it is necessary to delete m_hShape prior to assigning a new value to m_hShape ?
Discussion
3 archived replies
Posts are displayed in their archived order.
You don't need to delete that pointer.
Handle variables are managed by OCC similar to pointers in Java (Garbaje collector). If no one references the variable, memory is released
I get it. Thanks a lot.