View Issue Details

IDProjectCategoryView StatusLast Update
0001078CommunityOCCT:Application Frameworkpublic2011-12-15 17:50
ReporteremoAssigned Toszy 
PrioritynormalSeveritytrivial 
Status closedResolutionunable to reproduce 
OSAll 
Summary0001078: Another BIG memory managment bug
DescriptionThis bug has been added by Stephane Routelous at
http://www.opencascade.org/forumorg/bug.php?bug_id=100&f=8 .
------------

Hi all,

I found another bug :

The problem is that the selection for shapes ( in AIS_Shape :
StdSelect_BRepSelectionTool::Load(...) ) keep an instance of the TopoDS_Shape.

I took the same example as the previous bug ( BugSelect ).
I integrated the AIS_Shape::ComputeSelection method.

If I keep the original code, in the Destructor of the AIS_MyShape, you can see
in the VisualC++ debugger, that you have 2 instances of the TShape in "myshape"
:
Here is the debugger command :

(*(((*(Handle_Standard_Transient*)(&(*(Handle_MMgt_TShared*)(&(((*(AIS_Shape*)(&
*this))).myshape).myTShape))))).entity)).count = 2

if you remove all the code in ComputeSelection ( or return just at the beginning
), the same debugger command give you only one instance.

This means, that with the "normal" way to handle the TopoDS_Shape in AIS_Shape,
the TopoDS_Shape is NOT destroyed when the AIS_Shape is destroyed.

So, please, take care of all the memory managment problems.
With all those problems, it is not possible to develop big applications.
The memory is NEVER release ( well, only when you close the programm ).

---------

See the file attached
TagsNo tags attached.
Test case number

Attached Files

Activities

2002-12-02 10:14

 

BugSelect2.zip (48,689 bytes)

Issue History

Date Modified Username Field Change
2003-04-28 11:13 bugmaster Assigned To bugmaster => szy
2003-04-28 11:13 bugmaster Status new => assigned
2003-05-26 17:17 szy Status assigned => resolved
2004-05-20 17:29 bugmaster Status resolved => closed
2004-05-20 17:29 bugmaster Fixed in Version => 5.1.3
2004-05-20 17:29 bugmaster Resolution @0@ => unable to reproduce
2011-08-02 10:32 bugmaster Category OCCT:OCAF => OCCT:Application Framework
2011-12-15 17:50 bugmaster Project Open CASCADE => Community