Skip to content
Snippets Groups Projects
Commit fd1b49c1 authored by arnaud.charnoz@gmail.com's avatar arnaud.charnoz@gmail.com
Browse files

see #1357 : Problem with asynchronous messages during software closing....

see #1357 : Problem with asynchronous messages during software closing. Perform a manual cleanning of message deque after stop root services.

--HG--
branch : fw4spl_0.6.2
parent 81468c6e
Branches
Tags 6.2.1
No related merge requests found
......@@ -53,6 +53,9 @@ public:
FWSERVICES_API void setDeliveryType(DeliveryType t){m_deliveryType = t;}
virtual ~GlobalEventManager();
FWSERVICES_API void clearMessages();
protected :
GlobalEventManager();
......
......@@ -43,8 +43,15 @@ GlobalEventManager::GlobalEventManager() :
GlobalEventManager::~GlobalEventManager()
{
SLM_TRACE_FUNC();
this->clearMessages();
}
//-----------------------------------------------------------------------------
void GlobalEventManager::clearMessages()
{
m_msgDeque.clear();
}
//-----------------------------------------------------------------------------
......
......@@ -26,6 +26,8 @@
#include "fwServices/op/New.hpp"
#include "fwServices/op/Run.hpp"
#include "fwServices/op/Com.hpp"
#include "fwServices/GlobalEventManager.hpp"
namespace fwServices
{
......@@ -153,6 +155,9 @@ void ObjectServiceRegistry::uninitializeRootObject()
// Unregister root object services
::fwServices::OSR::unregisterServices(getDefault()->m_rootObject);
::fwServices::GlobalEventManager::getDefault()->clearMessages();
SLM_TRACE("uninitializeRootObject : Reset the last shared_ptr on root object.");
// Reset the root object: involve complete m_container clearing
getDefault()->m_rootObject.reset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment