| 169 | } |
| 170 | |
| 171 | FileSystemModule::~FileSystemModule() |
| 172 | { |
| 173 | LOG("File system module: uninstalling\n"); |
| 174 | ASSERT(m_instance == this); |
| 175 | |
| 176 | for (FileItemMap::iterator |
| 177 | it=fileitems_map->begin(); it!=fileitems_map->end(); ++it) { |
| 178 | delete it->second; |
| 179 | } |
| 180 | fileitems_map->clear(); |
| 181 | |
| 182 | for (ThumbnailMap::iterator |
| 183 | it=thumbnail_map->begin(); it!=thumbnail_map->end(); ++it) { |
| 184 | it->second->dispose(); |
| 185 | } |
| 186 | thumbnail_map->clear(); |
| 187 | |
| 188 | #ifdef _WIN32 |
| 189 | // relase desktop IShellFolder interface |
| 190 | shl_idesktop->Release(); |
| 191 | |
| 192 | // release IMalloc interface |
| 193 | shl_imalloc->Release(); |
| 194 | shl_imalloc = NULL; |
| 195 | #endif |
| 196 | |
| 197 | delete fileitems_map; |
| 198 | delete thumbnail_map; |
| 199 | |
| 200 | LOG("File system module: uninstalled\n"); |
| 201 | m_instance = NULL; |
| 202 | } |
| 203 | |
| 204 | FileSystemModule* FileSystemModule::instance() |
| 205 | { |