Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Close merged file upon destruction of TBufferMerger
Not closing the file breaks code that needs to open the merged output
file immediately afterwards. For example, the TDataFrame::Snapshot()
action.
  • Loading branch information
amadio committed May 10, 2017
commit 0b0048d03bcd250b3bb96d6f6634b14da1965976
1 change: 1 addition & 0 deletions io/io/src/TBufferMerger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ TBufferMerger::~TBufferMerger()
fCV.notify_one();

fMergingThread->join();
fFile->Close();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should'nt it be SafeDelete(fFile);
i.e. is the object pointed to by fFile re-used after this statement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, fFile is owned by the TBufferMerger class, it's a unique_ptr. It gets destroyed with the server. I just noticed, however, that the documentation on the header is wrong, I will update it.

}

std::shared_ptr<TBufferMergerFile> TBufferMerger::GetFile()
Expand Down