Memory leaks in the "Redisplay" function of AIS_InteractiveContext

I try the OCC6.5.2,I find a memory leaks in "Redisplay" function of AIS_InteractiveContext.
And I have set the MMGT_OPT = 0 ,After loop "Redisplay" and "RemoveAll",the memory yet increase.
The code like these:

Handle_AIS_Shape myBox;
BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.);
myBox = new AIS_Shape(B.Shape());
myAISContext->SetMaterial(myBox,Graphic3d_NOM_PEWTER);
myAISContext->SetDisplayMode(myBox,1);
myAISContext->Display(myBox);

for(int i = 0; i

{

BRepPrimAPI_MakeBox B(gp_Pnt(0-i,-400-i,-100-i), 200.+i,150.+i,100.+i);

myBox->Set(B.Shape());
myAISContext->Redisplay(myBox);

}

myAISContext->RemoveAll();

anyone can fix it?

Thanks!

Boris Weisman's picture

Hello
I encountered the same problem. Do you have any solution now?

I'll will appreciate for any help.

Best regards,
Boris

Billy's picture

What happens if you use eraseAll instead?

Boris Weisman's picture

EraseAll doesn't take effect. The memory released only after wglDeleteContext called in the OpenGl_Window class destructor. How to force cleanup without destroy the window ????