Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10696

TDirectory::GetObject() with wrong type leaks memory

    XMLWordPrintable

    Details

      Description

      I call TDirectoryFile::GetObject(), passing a TDirectory pointer. In some cases the name I am attempting to fetch exists in the file, but instead represents a TTree. I get a null pointer returned, as expected, but there is also a large memory leak (a few megabytes).

      I have worked around this by simply calling Get() and using GetClassName() to do the type checking manually. But the version with GetObject( ) was more convenient.

      I don't know if this problem is confined to TDirectory/TTree, or would happen with any mismatched pair of types.

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              16bdf91b327521302d81 Christopher Backhouse
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: