summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-02-16 15:22:59 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-02-16 15:22:59 +0100
commit9847d2c4a8287f220f169236b4fa1962d50d1187 (patch)
tree69d901c62ead8809b6a812fc542d54a320c26ab5
parentbc2e4018054f494fcba01e6a27a63e151bf1e9a4 (diff)
downloadastra-9847d2c4a8287f220f169236b4fa1962d50d1187.tar.gz
astra-9847d2c4a8287f220f169236b4fa1962d50d1187.tar.bz2
astra-9847d2c4a8287f220f169236b4fa1962d50d1187.tar.xz
astra-9847d2c4a8287f220f169236b4fa1962d50d1187.zip
Also remove objects from index manager
-rw-r--r--include/astra/AstraObjectManager.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/astra/AstraObjectManager.h b/include/astra/AstraObjectManager.h
index eab3f03..8b9da30 100644
--- a/include/astra/AstraObjectManager.h
+++ b/include/astra/AstraObjectManager.h
@@ -77,6 +77,13 @@ public:
return 0;
}
+ void remove(int index) {
+ std::map<int, CAstraObjectManagerBase*>::iterator i;
+ i = m_table.find(index);
+ if (i != m_table.end())
+ m_table.erase(i);
+ }
+
private:
/** The index last handed out
*/
@@ -216,7 +223,9 @@ void CAstraObjectManager<T>::remove(int _iIndex)
// delete data
delete (*it).second;
// delete from map
- m_mIndexToObject.erase(it);
+ m_mIndexToObject.erase(it);
+
+ CAstraIndexManager::getSingleton().remove(_iIndex);
}
//----------------------------------------------------------------------------------------