mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 01:58:35 +05:00
21948: EDF SMESH : Memory is not freed when deleting a mesh
Fix leaks of myPreHighlightActor and myHighlightActor
This commit is contained in:
parent
3304d08571
commit
37eb451785
@ -129,9 +129,11 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
myIsEntityModeCache = false;
|
myIsEntityModeCache = false;
|
||||||
|
|
||||||
myHighlightActor = SMESH_SVTKActor::New();
|
myHighlightActor = SMESH_SVTKActor::New();
|
||||||
|
myHighlightActor->Delete(); // vtkSmartPointer!
|
||||||
myHighlightActor->Initialize();
|
myHighlightActor->Initialize();
|
||||||
|
|
||||||
myPreHighlightActor = SMESH_SVTKActor::New();
|
myPreHighlightActor = SMESH_SVTKActor::New();
|
||||||
|
myPreHighlightActor->Delete();
|
||||||
myPreHighlightActor->Initialize();
|
myPreHighlightActor->Initialize();
|
||||||
|
|
||||||
myIsShrinkable = false;
|
myIsShrinkable = false;
|
||||||
@ -539,12 +541,9 @@ SMESH_ActorDef::~SMESH_ActorDef()
|
|||||||
{
|
{
|
||||||
if(MYDEBUG) MESSAGE("~SMESH_ActorDef - "<<this);
|
if(MYDEBUG) MESSAGE("~SMESH_ActorDef - "<<this);
|
||||||
|
|
||||||
#ifndef DISABLE_PLOT2DVIEWER
|
// Please keep the order same as one in the header file
|
||||||
if(my2dHistogram) {
|
|
||||||
SMESH::ProcessIn2DViewers(this,SMESH::RemoveFrom2dViewer);
|
myTimeStamp->Delete();
|
||||||
delete my2dHistogram;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
myScalarBarActor->Delete();
|
myScalarBarActor->Delete();
|
||||||
myLookupTable->Delete();
|
myLookupTable->Delete();
|
||||||
@ -553,47 +552,53 @@ SMESH_ActorDef::~SMESH_ActorDef()
|
|||||||
myBackSurfaceProp->Delete();
|
myBackSurfaceProp->Delete();
|
||||||
myNormalVProp->Delete();
|
myNormalVProp->Delete();
|
||||||
myReversedVProp->Delete();
|
myReversedVProp->Delete();
|
||||||
myOutLineProp->Delete();
|
|
||||||
|
|
||||||
myEdgeProp->Delete();
|
myEdgeProp->Delete();
|
||||||
myHighlightProp->Delete();
|
|
||||||
myPreselectProp->Delete();
|
|
||||||
|
|
||||||
myNodeProp->Delete();
|
myNodeProp->Delete();
|
||||||
myNodeExtProp->Delete();
|
|
||||||
|
|
||||||
my0DProp->Delete();
|
|
||||||
my0DActor->Delete();
|
|
||||||
myBallActor->Delete();
|
|
||||||
|
|
||||||
//my0DExtProp->Delete();
|
|
||||||
//my0DExtActor->Delete();
|
|
||||||
|
|
||||||
my1DProp->Delete();
|
|
||||||
my1DActor->Delete();
|
|
||||||
|
|
||||||
my1DExtProp->Delete();
|
|
||||||
my1DExtActor->Delete();
|
|
||||||
|
|
||||||
my2DActor->Delete();
|
|
||||||
my2DExtProp->Delete();
|
|
||||||
my2DExtActor->Delete();
|
|
||||||
my3DActor->Delete();
|
|
||||||
my3DExtProp->Delete();
|
|
||||||
my3DExtActor->Delete();
|
|
||||||
|
|
||||||
myNodeActor->Delete();
|
myNodeActor->Delete();
|
||||||
myBaseActor->Delete();
|
myBaseActor->Delete();
|
||||||
|
//myPickableActor->Delete(); myPickableActor == myBaseActor
|
||||||
|
|
||||||
myNodeExtActor->Delete();
|
myHighlightProp->Delete();
|
||||||
myHighlitableActor->Delete();
|
myOutLineProp->Delete();
|
||||||
|
myPreselectProp->Delete();
|
||||||
|
|
||||||
myImplicitBoolean->Delete();
|
|
||||||
|
|
||||||
myTimeStamp->Delete();
|
|
||||||
myBallHighlightProp->Delete();
|
myBallHighlightProp->Delete();
|
||||||
myBallPreselectProp->Delete();
|
myBallPreselectProp->Delete();
|
||||||
|
|
||||||
|
myHighlitableActor->Delete();
|
||||||
|
|
||||||
|
my2DExtProp->Delete();
|
||||||
|
my3DExtProp->Delete();
|
||||||
|
my2DActor->Delete();
|
||||||
|
my2DExtActor->Delete();
|
||||||
|
my3DActor->Delete();
|
||||||
|
my3DExtActor->Delete();
|
||||||
|
// myControlActor->Delete(); myControlActor == my2DActor
|
||||||
|
|
||||||
|
myNodeExtProp->Delete();
|
||||||
|
myNodeExtActor->Delete();
|
||||||
|
|
||||||
|
my1DProp->Delete();
|
||||||
|
my1DActor->Delete();
|
||||||
|
my1DExtProp->Delete();
|
||||||
|
my1DExtActor->Delete();
|
||||||
|
|
||||||
|
my0DProp->Delete();
|
||||||
|
my0DActor->Delete();
|
||||||
|
myBallProp->Delete();
|
||||||
|
myBallActor->Delete();
|
||||||
|
//my0DExtProp->Delete();
|
||||||
|
//my0DExtActor->Delete();
|
||||||
|
|
||||||
|
myImplicitBoolean->Delete();
|
||||||
|
|
||||||
|
#ifndef DISABLE_PLOT2DVIEWER
|
||||||
|
if(my2dHistogram) {
|
||||||
|
SMESH::ProcessIn2DViewers(this,SMESH::RemoveFrom2dViewer);
|
||||||
|
delete my2dHistogram;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESH_ActorDef::Delete()
|
void SMESH_ActorDef::Delete()
|
||||||
@ -1681,12 +1686,12 @@ void SMESH_ActorDef::UpdateHighlight(){
|
|||||||
{
|
{
|
||||||
if(myIsHighlighted) {
|
if(myIsHighlighted) {
|
||||||
myHighlitableActor->SetProperty(myHighlightProp);
|
myHighlitableActor->SetProperty(myHighlightProp);
|
||||||
myBallActor->SetProperty(myBallHighlightProp);
|
myBallActor->SetProperty(myBallHighlightProp);
|
||||||
}else if(myIsPreselected){
|
}else if(myIsPreselected){
|
||||||
myHighlitableActor->SetProperty(myPreselectProp);
|
myHighlitableActor->SetProperty(myPreselectProp);
|
||||||
myBallActor->SetProperty(myBallPreselectProp);
|
myBallActor->SetProperty(myBallPreselectProp);
|
||||||
} else if(anIsVisible){
|
} else if(anIsVisible){
|
||||||
myBallActor->SetProperty(myBallProp);
|
myBallActor->SetProperty(myBallProp);
|
||||||
(myRepresentation == eSurface) ?
|
(myRepresentation == eSurface) ?
|
||||||
myHighlitableActor->SetProperty(myOutLineProp) : myHighlitableActor->SetProperty(myEdgeProp);
|
myHighlitableActor->SetProperty(myOutLineProp) : myHighlitableActor->SetProperty(myEdgeProp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user