MCPcopy Create free account
hub / github.com/MITK/MITK / Unload

Method Unload

Modules/Core/src/mitkCoreActivator.cpp:320–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320void 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
358void MitkCoreActivator::RegisterDefaultMimeTypes()
359{

Callers

nothing calls this directly

Calls 4

UnregisterMethod · 0.45
StopMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected