How to free memory for unhighlighted lines
Submitted by Keito Okajima on 15 March, 2021 - 01:08
Forums:
Hello,
I am using OpenCascade V7.4.0 on 32bit windows.
I am making a process to select the line drawn on the screen and highlight the selected line.
view and context are created from the parent viewer respectively.
context-> Select (xMin, yMin, xMax, yMax, view, Standard_False);
view-> Redraw ();
-----
view = viewer-> CreateView ();
context = new AIS_InteractiveContext (viewer);
Selecting and highlighting a row will increase memory. After that, deselecting the line and unhighlighting does not reduce the increased memory.
Is there a way to free up the extra memory while displaying the lines?
Best regards.
Keito
There are two reasons when
There are two reasons when highlighting might hold extra memory:
OCCT 3D Viewer normally caches the presentation computed for highlighting to ensure that the next time it will be displayed faster.
Within the first case, you may consider using the same display mode for highlighting as used for main presentation.
You may try to clear additional presentation explicitly after unhighlighting [context->MainPrsMgr()->Erase(object, AIS_Wireframe)], but this could be error-prone.
Within the second case, auxiliary presentations should be released by deactivation of selection mode.
P.S.: It is better moving to the new forum - this one will be locked / shut down soon.