AmpToolsInterface::resetConfigurationInfo calls AmpToolsInterface::clear
clear deletes DataReader objects stored in m_uniqueDataSets
m_uniqueDataSets stores DataReaders created by m_userDataReaders-> newDataReader
Inside UserDataReader.h the m_dataReaderInstances map needs to be cleared when AmpToolsInterface is cleared otherwise the objects it points to after the first (or second pass?) has been deleted and will not be created again when newDataReader is called again. This will results in a corrupted memory error.
Why would someone call resetConfigurationInfo multiple times you ask? Not in any of the standard tools. I do it with these nifty fits to reset the state multiple times to find a good starting position
AmpToolsInterface::resetConfigurationInfocallsAmpToolsInterface::clearcleardeletes DataReader objects stored inm_uniqueDataSetsm_uniqueDataSetsstores DataReaders created bym_userDataReaders-> newDataReaderInside
UserDataReader.hthem_dataReaderInstancesmap needs to be cleared when AmpToolsInterface is cleared otherwise the objects it points to after the first (or second pass?) has been deleted and will not be created again whennewDataReaderis called again. This will results in a corrupted memory error.Why would someone call
resetConfigurationInfomultiple times you ask? Not in any of the standard tools. I do it with these nifty fits to reset the state multiple times to find a good starting position