Bug fix: memory leak in block AMG
This commit is contained in:
parent
986bce03e5
commit
11122b385e
1 changed files with 14 additions and 2 deletions
|
@ -25,7 +25,8 @@ Class
|
||||||
Foam::lduPrimitiveMesh
|
Foam::lduPrimitiveMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simplest contrete lduMesh which stores the addressing needed bu lduMatrix.
|
Simplest contrete lduMesh which stores the addressing needed by the
|
||||||
|
lduMatrix. Addressing is contained locally
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -115,7 +116,18 @@ public:
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
virtual ~lduPrimitiveMesh()
|
virtual ~lduPrimitiveMesh()
|
||||||
{}
|
{
|
||||||
|
// Clear interface pointers: they are not deleted
|
||||||
|
// by the lduInterfacePtrsList (derived from UPtrList)
|
||||||
|
// HJ, 5/Feb/2016
|
||||||
|
forAll (interfaces_, i)
|
||||||
|
{
|
||||||
|
if (interfaces_.set(i))
|
||||||
|
{
|
||||||
|
delete interfaces_(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
Reference in a new issue