1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027318: Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects

- destructor was added to SelectMgr_SelectableObject to clean up selections;
- test case for issue #27318

Warnings elimination
This commit is contained in:
vpa
2016-03-30 18:06:52 +03:00
committed by abv
parent 16b40363d3
commit 4c0d97ac42
4 changed files with 73 additions and 1 deletions

View File

@@ -69,6 +69,17 @@ SelectMgr_SelectableObject::SelectMgr_SelectableObject (const PrsMgr_TypeOfPrese
myHilightDrawer->Link (myDrawer);
}
//==================================================
// Function: Destructor
// Purpose : Clears all selections of the object
//==================================================
SelectMgr_SelectableObject::~SelectMgr_SelectableObject()
{
for (Standard_Integer aSelIdx = 1; aSelIdx <= myselections.Length(); ++aSelIdx)
{
myselections.Value (aSelIdx)->Clear();
}
}
//==================================================
// Function: HasSelection

View File

@@ -56,6 +56,8 @@ class SelectMgr_SelectableObject : public PrsMgr_PresentableObject
public:
//! Clears all selections of the object
Standard_EXPORT virtual ~SelectMgr_SelectableObject();
//! Recovers and calculates any sensitive primitive,
//! aSelection, available in Shape mode, specified by