| 134 | } |
| 135 | |
| 136 | bool remove(char const* pName, bool deleteObject = true) |
| 137 | { |
| 138 | InternalMapIter mapIter = m_Map.find(pName); |
| 139 | |
| 140 | if (mapIter == m_Map.end()) |
| 141 | { |
| 142 | return false ; |
| 143 | } |
| 144 | |
| 145 | DataType pObject = mapIter->second ; |
| 146 | |
| 147 | if (deleteObject) |
| 148 | { |
| 149 | delete pObject ; |
| 150 | } |
| 151 | |
| 152 | m_Map.erase(mapIter) ; |
| 153 | |
| 154 | return true ; |
| 155 | } |
| 156 | }; |
| 157 | |
| 158 | }//closes namespace |