| 318 | } |
| 319 | |
| 320 | void MitkCoreActivator::Unload(us::ModuleContext *) |
| 321 | { |
| 322 | for (auto &elem : m_FileReaders) |
| 323 | { |
| 324 | delete elem; |
| 325 | } |
| 326 | |
| 327 | for (auto &elem : m_FileWriters) |
| 328 | { |
| 329 | delete elem; |
| 330 | } |
| 331 | |
| 332 | for (auto &elem : m_FileIOs) |
| 333 | { |
| 334 | delete elem; |
| 335 | } |
| 336 | |
| 337 | // The mitk::ModuleContext* argument of the Unload() method |
| 338 | // will always be 0 for the Mitk library. It makes no sense |
| 339 | // to use it at this stage anyway, since all libraries which |
| 340 | // know about the module system have already been unloaded. |
| 341 | |
| 342 | // we need to close the internal service tracker of the |
| 343 | // MimeTypeProvider class here. Otherwise it |
| 344 | // would hold on to the ModuleContext longer than it is |
| 345 | // actually valid. |
| 346 | m_MimeTypeProviderReg.Unregister(); |
| 347 | m_MimeTypeProvider->Stop(); |
| 348 | |
| 349 | for (std::vector<mitk::CustomMimeType *>::const_iterator mimeTypeIter = m_DefaultMimeTypes.begin(), |
| 350 | iterEnd = m_DefaultMimeTypes.end(); |
| 351 | mimeTypeIter != iterEnd; |
| 352 | ++mimeTypeIter) |
| 353 | { |
| 354 | delete *mimeTypeIter; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | void MitkCoreActivator::RegisterDefaultMimeTypes() |
| 359 | { |
nothing calls this directly
no test coverage detected