BUG: MeshObject: do not release in destructor. Leave to regIOobject. Fixes #1276.

This commit is contained in:
mattijs
2019-04-15 15:06:57 +01:00
committed by Andrew Heather
parent cd7748f8e4
commit f0a68bfa58

View File

@ -104,7 +104,10 @@ bool Foam::MeshObject<Mesh, MeshObjectType, Type>::Delete(const Mesh& mesh)
template<class Mesh, template<class> class MeshObjectType, class Type> template<class Mesh, template<class> class MeshObjectType, class Type>
Foam::MeshObject<Mesh, MeshObjectType, Type>::~MeshObject() Foam::MeshObject<Mesh, MeshObjectType, Type>::~MeshObject()
{ {
MeshObjectType<Mesh>::release(); // We should not do a 'release' at this point since that will upset
// the destructor of regIOobject itself (which gets called after this).
// This now would no longer have the owned-by-registry setting so
// will not clean up after itself
} }