src/Generic/edt/AbbrevTable.cpp
// destroy all objects owned by AbbrevTable

destroy all objects owned by AbbrevTable
destroy all objects owned by AbbrevTable
void AbbrevTable::destroy() {
	if (!is_initialized) {
		throw InternalInconsistencyException("AbbrevTable::destroy()",
											 "AbbrevTable has not been initialized.");
	}
	SymbolArraySymbolArrayMap::iterator iter;
	for (iter = _table[STATIC]->begin();
		 iter != _table[STATIC]->end();
		 ++iter)
	{
		delete (*iter).first;
		delete (*iter).second;
	}
	delete _table[STATIC];
	for (iter = _table[DYNAMIC]->begin();
		 iter != _table[DYNAMIC]->end();
		 ++iter)
	{
		delete (*iter).first;
		delete (*iter).second;
	}
	delete _table[DYNAMIC];
	is_initialized = false;
}
void AbbrevTable :: destroy ( ) { if ( ! is_initialized ) { throw InternalInconsistencyException ( " " , " " ) ; } SymbolArraySymbolArrayMap :: iterator iter ; for ( iter = _table [ STATIC ] -> begin ( ) ; iter != _table [ STATIC ] -> end ( ) ; ++ iter ) { delete ( * iter ) . first ; delete ( * iter ) . second ; } delete _table [ STATIC ] ; for ( iter = _table [ DYNAMIC ] -> begin ( ) ; iter != _table [ DYNAMIC ] -> end ( ) ; ++ iter ) { delete ( * iter ) . first ; delete ( * iter ) . second ; } delete _table [ DYNAMIC ] ; is_initialized = false ; }
destroy all objects owned by AbbrevTable
destroy all objects owned by AbbrevTable
//delete stuff
