cleanup_temp_datasets
C++ Function Reference
1 Signature
void BigDataStatMeth::DiagonalOps::cleanup_temp_datasets(BigDataStatMeth::hdf5Dataset *tempA, BigDataStatMeth::hdf5Dataset *tempB)2 Description
Clean up temporary datasets created during operations.
3 Parameters
tempA(BigDataStatMeth::hdf5Dataset *): Temporary dataset A (can be nullptr)tempB(BigDataStatMeth::hdf5Dataset *): Temporary dataset B (can be nullptr)
4 Details
Safely deletes temporary datasets and releases memory. Used internally to ensure proper resource cleanup even when exceptions occur.
5 Call Graph
6 Source Code
NoteImplementation
File: inst/include/hdf5Utilities/hdf5DiagonalMethods.hpp • Lines 100-115
inline void cleanup_temp_datasets(BigDataStatMeth::hdf5Dataset* tempA,
BigDataStatMeth::hdf5Dataset* tempB)
{
try {
if (tempA != nullptr) {
delete tempA;
tempA = nullptr;
}
if (tempB != nullptr) {
delete tempB;
tempB = nullptr;
}
} catch(...) {
// Silent cleanup
}
}7 Usage Example
#include "BigDataStatMeth.hpp"
// Example usage
auto result = cleanup_temp_datasets(...);