diff --git a/ADOL-C/src/tape_handling.cpp b/ADOL-C/src/tape_handling.cpp index d549104c..347e3fe0 100644 --- a/ADOL-C/src/tape_handling.cpp +++ b/ADOL-C/src/tape_handling.cpp @@ -563,23 +563,15 @@ static void init_lib() { readConfigFile(); } -static void clearCurrentTape() { - ADOLC_OPENMP_THREAD_NUMBER; - ADOLC_OPENMP_GET_THREAD_NUMBER; - TapeInfos *tmpTapeInfos = new TapeInfos; - - ADOLC_CURRENT_TAPE_INFOS.copy(*tmpTapeInfos); - ADOLC_CURRENT_TAPE_INFOS_FALLBACK.copy(*tmpTapeInfos); - delete tmpTapeInfos; -} - /* does things like closing/removing temporary files, ... */ void cleanUp() { ADOLC_OPENMP_THREAD_NUMBER; ADOLC_OPENMP_GET_THREAD_NUMBER; + initTapeInfos(&ADOLC_CURRENT_TAPE_INFOS); + initTapeInfos(&ADOLC_CURRENT_TAPE_INFOS_FALLBACK); + TapeInfos **tiIter; - clearCurrentTape(); while (!ADOLC_TAPE_INFOS_BUFFER.empty()) { tiIter = &ADOLC_TAPE_INFOS_BUFFER.back(); ADOLC_TAPE_INFOS_BUFFER.pop_back();