Thanks for the finding. Is it okay for you if I do a commit to fix this memory 
leak in your name? Best, Stefan

From: Bertram Sabrowsky-Hirsch 
[mailto:bertram.sabrowsky-hir...@risc-software.at]
Sent: Dienstag, 21. August 2018 10:30
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] mitk::UndoModel: Memory Leak

Hi everyone,

When implementing undo for my plugin I noticed that setting an undo limit will 
cause Memory leaks since UndoStackItems are not deleted when exceeding the 
limit (unlike when using ClearList).
See mitkLimitedLinearUndo.cpp(and for that issue also 
VerboseLimitedLinearUndo.cpp) in the method SetOperationEvent:

  if (m_UndoLimit > 0 && m_UndoList.size() == m_UndoLimit)
  {
    m_UndoList.pop_front();
  }

Kind regards,

Bertram
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to