[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3217 - trunk/pingus/src/gui
From: |
jsalmon3 |
Subject: |
[Pingus-CVS] r3217 - trunk/pingus/src/gui |
Date: |
Sat, 22 Sep 2007 03:52:20 +0200 |
Author: jsalmon3
Date: 2007-09-22 03:52:14 +0200 (Sat, 22 Sep 2007)
New Revision: 3217
Modified:
trunk/pingus/src/gui/group_component.cpp
trunk/pingus/src/gui/group_component.hpp
Log:
Fixed memory leak
Modified: trunk/pingus/src/gui/group_component.cpp
===================================================================
--- trunk/pingus/src/gui/group_component.cpp 2007-09-22 01:47:03 UTC (rev
3216)
+++ trunk/pingus/src/gui/group_component.cpp 2007-09-22 01:52:14 UTC (rev
3217)
@@ -35,6 +35,10 @@
GroupComponent::~GroupComponent()
{
+ for(Components::iterator i = delete_children.begin(); i !=
delete_children.end(); ++i)
+ {
+ delete *i;
+ }
}
void
@@ -246,6 +250,8 @@
{
comp->set_parent(this);
children.push_back(comp);
+ if (delete_comp)
+ delete_children.push_back(comp);
}
void
Modified: trunk/pingus/src/gui/group_component.hpp
===================================================================
--- trunk/pingus/src/gui/group_component.hpp 2007-09-22 01:47:03 UTC (rev
3216)
+++ trunk/pingus/src/gui/group_component.hpp 2007-09-22 01:52:14 UTC (rev
3217)
@@ -31,6 +31,7 @@
private:
typedef std::vector<Component*> Components;
Components children;
+ Components delete_children;
DrawingContext drawing_context;
/** Used to detect enter/leave events */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3217 - trunk/pingus/src/gui,
jsalmon3 <=