
Tue, 07/16/2013 - 13:31
Hi,
We have a application which create/destruct object in following order.
----------------------------------Code-Steps--------------------------------
Step 1 : TDocStd_Application* app = new DerivedClassFrom(TDocStd_Application)
Step 2 : TDocStd_Document* GetDoc()
{
Handle(TDocStd_Document) doc;
app->NewDocument("BinOcaf", doc);
return (static_cast
}
Step 3: Handle(XCAFDoc_ShapeTool) *_shapeTool = new Handle(XCAFDoc_ShapeTool)(XCAFDoc_DocumentTool::ShapeTool(GetDoc()->Main()));
Step 4 : delete _shapeTool;
------------------------------------------------------------------------------------------------------------------
Above code steps are executed from Step 1 to 4 in order. This was working fine in case of 6.5.3
but Step 4 is crashing in 6.5.4.
My doubt is,
1. is there any changes in usage of handle in all above(Step1-4) classes/APIs used?
2. Is Step2 correct? I mean handle object going out of scope, but we are returning underlying entity pointer.
Has anyone faced similar problem?
Any help on this will be highly appreciable?
Tue, 08/27/2013 - 09:09
This is your problem I think
http://opencascade.blogspot.com.au/2013/06/significant-side-effects-in-o...