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 cellLinks: adjuct vtkCellLinks::MaxId + void ResizeForPoint(vtkIdType vtkID);
This commit is contained in:
parent
a29e12d8f9
commit
56b857de47
@ -17,7 +17,6 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
#define CHRONODEF
|
|
||||||
#include "SMDS_UnstructuredGrid.hxx"
|
#include "SMDS_UnstructuredGrid.hxx"
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
#include "SMDS_MeshInfo.hxx"
|
#include "SMDS_MeshInfo.hxx"
|
||||||
@ -44,14 +43,14 @@ SMDS_CellLinks* SMDS_CellLinks::New()
|
|||||||
return new SMDS_CellLinks();
|
return new SMDS_CellLinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkCellLinks::Link* SMDS_CellLinks::ResizeL(vtkIdType sz)
|
void SMDS_CellLinks::ResizeForPoint(vtkIdType vtkID)
|
||||||
{
|
{
|
||||||
return vtkCellLinks::Resize(sz);
|
if ( vtkID > this->MaxId )
|
||||||
}
|
{
|
||||||
|
this->MaxId = vtkID;
|
||||||
vtkIdType SMDS_CellLinks::GetLinksSize()
|
if ( vtkID >= this->Size )
|
||||||
{
|
vtkCellLinks::Resize( vtkID+SMDS_Mesh::chunkSize );
|
||||||
return this->Size;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SMDS_CellLinks::SMDS_CellLinks() :
|
SMDS_CellLinks::SMDS_CellLinks() :
|
||||||
@ -154,7 +153,7 @@ void SMDS_UnstructuredGrid::setSMDS_mesh(SMDS_Mesh *mesh)
|
|||||||
void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int newNodeSize,
|
void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int newNodeSize,
|
||||||
std::vector<int>& idCellsOldToNew, int newCellSize)
|
std::vector<int>& idCellsOldToNew, int newCellSize)
|
||||||
{
|
{
|
||||||
MESSAGE("------------------------- SMDS_UnstructuredGrid::compactGrid " << newNodeSize << " " << newCellSize);CHRONO(1);
|
MESSAGE("------------------------- SMDS_UnstructuredGrid::compactGrid " << newNodeSize << " " << newCellSize);//CHRONO(1);
|
||||||
int alreadyCopied = 0;
|
int alreadyCopied = 0;
|
||||||
|
|
||||||
// --- if newNodeSize, create a new compacted vtkPoints
|
// --- if newNodeSize, create a new compacted vtkPoints
|
||||||
|
Loading…
Reference in New Issue
Block a user