mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
fix in curvedelems.cpp: * -> shared_ptr to secure destruction of glob. obj.
This commit is contained in:
parent
39c19b815e
commit
d551b91182
@ -337,7 +337,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Array<RecPol*> jacpols2;
|
static Array<shared_ptr<RecPol>> jacpols2;
|
||||||
|
|
||||||
|
|
||||||
// compute face bubbles up to order n, 0 < y, y-x < 1, x+y < 1
|
// compute face bubbles up to order n, 0 < y, y-x < 1, x+y < 1
|
||||||
@ -451,8 +451,6 @@ namespace netgen
|
|||||||
|
|
||||||
CurvedElements :: ~CurvedElements()
|
CurvedElements :: ~CurvedElements()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < jacpols2.Size(); i++)
|
|
||||||
delete jacpols2[i];
|
|
||||||
jacpols2.SetSize(0);
|
jacpols2.SetSize(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +629,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
jacpols2.SetSize (100);
|
jacpols2.SetSize (100);
|
||||||
for (int i = 0; i < 100; i++)
|
for (int i = 0; i < 100; i++)
|
||||||
jacpols2[i] = new JacobiRecPol (100, i, 2);
|
jacpols2[i] = make_shared<JacobiRecPol> (100, i, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintMessage (3, "Curving edges");
|
PrintMessage (3, "Curving edges");
|
||||||
|
Loading…
Reference in New Issue
Block a user