Skip to content

Commit

Permalink
Merge pull request #46 from NeurodataWithoutBorders/reset-recording-c…
Browse files Browse the repository at this point in the history
…ontainers

reset recordingContainers when nwbfile is finalized
  • Loading branch information
stephprince authored Aug 5, 2024
2 parents d119660 + 97e0018 commit 62bab75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/nwb/NWBFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void NWBFile::initialize()

void NWBFile::finalize()
{
recordingContainers.reset();
io->close();
}

Expand Down
9 changes: 7 additions & 2 deletions src/nwb/NWBFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,15 @@ class NWBFile
void cacheSpecifications(const std::string& specPath,
const std::string& versionNumber);

const std::string identifierText;
std::shared_ptr<BaseIO> io;
/**
* @brief Holds the Container (usually TimeSeries) objects that have been
* created in the nwb file for recording.
*/
std::unique_ptr<RecordingContainers> recordingContainers =
std::make_unique<RecordingContainers>("RecordingContainers");

const std::string identifierText;
std::shared_ptr<BaseIO> io;
};

/**
Expand Down

0 comments on commit 62bab75

Please sign in to comment.