Sun, 05/28/2000 - 19:32
Forums:
Hello, As myAISContext and myViewer are created using a new operator, i Try to call the Delete Operator of these two variables in my Document Destructor. This causes my Program crashing. Can some one explain me how to do it well. I mean deleting those two pointers ?? Thanxs Omar Msaaf
Sun, 05/28/2000 - 21:31
Hello,
As soon as the V3d_Viewer and the AIS_InteractiveContext are classes using Cascade Smart poiters, you don't need to destroy them ( it should be automatically done when the object is not used anymore ).
BTW, if you want to nullify the C++ pointer in this Handle class, you can use the function Nullify
Ex :
Handle_V3d_Viewer theViewer = new V3d_Viewer(....);
theViewer.Nullify();
Take care using Nullify. It can be dangerous.
Stephane
Tue, 05/30/2000 - 17:16
The main reason was in a bug wen i opened a saved document where i saved some objects. I couldn't see them but when i used my mouse i saw the wireframe. By using delete myAISContext; I overrided this error. And my prog doesn't crash anymore. Thanxs for your help