Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2285
Closed
Open
Issue created Dec 01, 2021 by Mattijs Janssens@MattijsMaintainer

coded functionObject does not clean up

Summary

tutorial leaks memory

Steps to reproduce

Tutorial tutorials/incompressible/simpleFoam/nonOrthogonalChannel. Run any setup under valgrind.

Environment information

  • OpenFOAM version :feature-nonorthogonal-correction-schemes

Possible fixes

Don't use static inside functionObject. Use e.g.

                regIOobject::store
                (
                    new volScalarField
                    (
                        IOobject
                        (
                            "productionRate",
                            mesh().time().timeName(),
                            mesh(),
                            IOobject::NO_READ,
                            IOobject::AUTO_WRITE
                        ),
                        mesh(),
                        sqr(dimLength)/pow(dimTime, 3)
                    )
                );
Assignee
Assign to
Time tracking