Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv660
Modified Files:
UI.cpp
Log Message:
Previous messages are deleted (fix memory leak). Previous commit was incomplete.
Index: UI.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** UI.cpp 24 Aug 2007 18:37:56 -0000 1.14
--- UI.cpp 24 Aug 2007 18:52:50 -0000 1.15
***************
*** 39,42 ****
--- 39,49 ----
{
mui.Lock();
+
+ if (_msg->getParent()==root) {
+ if (lastTopChild) {
+ delete(lastTopChild);
+ lastTopChild=0;
+ }
+ }
if (!current)
current=root;
***************
*** 45,48 ****
--- 52,59 ----
current=_msg;
+
+ if (_msg->getParent()==root)
+ lastTopChild=_msg;
+
Display(current);
mui.Unlock();
|