Commit e510fb3d authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

removed memory leak

parent a062de39
...@@ -93,6 +93,8 @@ namespace AMDiS { ...@@ -93,6 +93,8 @@ namespace AMDiS {
*/ */
void setLeftPrecon(ITL_BasePreconditioner* p) void setLeftPrecon(ITL_BasePreconditioner* p)
{ {
if (leftPrecon)
delete leftPrecon;
leftPrecon = p; leftPrecon = p;
} }
...@@ -103,6 +105,8 @@ namespace AMDiS { ...@@ -103,6 +105,8 @@ namespace AMDiS {
*/ */
void setRightPrecon(ITL_BasePreconditioner* p) void setRightPrecon(ITL_BasePreconditioner* p)
{ {
if (rightPrecon)
delete rightPrecon;
rightPrecon = p; rightPrecon = p;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment