Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
New log manager since rev. 4606
dmoore:
I'm confused: Does
--- Code: ---CodeBlocksLogEvent evt(cbEVT_REMOVE_LOG_WINDOW,mylogger);
Manager::Get()->ProcessEvent(evt);
--- End code ---
automatically delete mylogger?
dje:
Hi Damien !
You can have a look at ThreadSearch plugin.
I don't remember precisely how it works but memory management is clean both with Messages notebook and wxAuiLayout.
I think it is not deleted, simply removed (you'll have to check).
I can send you a mail tonight if you need more info (I don't have this code at work).
Dje
dmoore:
well I don't see the debugger plugin release the memory for its loggers:
debuggergdb.cpp:458
--- Code: --- if (Manager::Get()->GetLogManager())
{
if (m_HasDebugLog)
{
CodeBlocksLogEvent evt(cbEVT_REMOVE_LOG_WINDOW, m_pDbgLog);
Manager::Get()->ProcessEvent(evt);
m_pDbgLog = 0;
}
CodeBlocksLogEvent evt(cbEVT_REMOVE_LOG_WINDOW, m_pLog);
Manager::Get()->ProcessEvent(evt);
m_pLog = 0;
}
--- End code ---
mandrav:
--- Code: --- if (event.window)
infoPane->RemoveNonLogger(event.window);
else
infoPane->DeleteLogger(event.logger);
--- End code ---
In short:
[*] if it's a _real_ logger, it is deleted.
[*] if it's a custom window, it is not deleted but simply removed.
dmoore:
I was pretty sure that was the case - thanks for clarifying
Navigation
[0] Message Index
[*] Previous page
Go to full version