Skip to content

Leak on Info pointer from class TTheoryIntermediateCache #35

@eatdust

Description

@eatdust

Hi there,
tested under gfortran-10.3.0, this "Info" pointer is leaking at each Cls evaluation.

From Calculator_CAMB.f90:

``

subroutine CAMBCalc_GetNewTransferData(this, CMB,Info,Theory,error)
...
class(TTheoryIntermediateCache), pointer :: Info
...
allocate(Info, source=this%DefaultInstance)

``

A possible fix is to keep the same all along the runs with:

if (.not.associated(Info)) allocate(Info, source=this%DefaultInstance)

or, maybe, writing an explicit deallocation in the Clear procedure, which is currently empty?

In GeneralType.f90

``

subroutine TTheoryIntermediateCache_Clear(Info)
class(TTheoryIntermediateCache) Info

end subroutine TTheoryIntermediateCache_Clear

``

Dunno what is best!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions