For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

About the Handle ???

Jun WANG's picture

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 ?

Paul Jimenez's picture

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.

arkoala's picture

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

Jun WANG's picture

I get it. Thanks a lot.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.