You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/02/10 22:41:25 UTC
svn commit: r1242941 - in /incubator/mesos/trunk/src: master/master.cpp
slave/slave.cpp
Author: benh
Date: Fri Feb 10 21:41:24 2012
New Revision: 1242941
URL: http://svn.apache.org/viewvc?rev=1242941&view=rev
Log:
Free more in Master, Slave (contributed by Charles Reiss).
Modified:
incubator/mesos/trunk/src/master/master.cpp
incubator/mesos/trunk/src/slave/slave.cpp
Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1242941&r1=1242940&r2=1242941&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Fri Feb 10 21:41:24 2012
@@ -1217,6 +1217,8 @@ struct TaskDescriptionVisitor
Offer* offer,
Framework* framework,
Slave* slave) = 0;
+
+ virtual ~TaskDescriptionVisitor() {}
};
Modified: incubator/mesos/trunk/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.cpp?rev=1242941&r1=1242940&r2=1242941&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave/slave.cpp Fri Feb 10 21:41:24 2012
@@ -97,10 +97,17 @@ Slave::Slave(const Configuration& _conf,
Slave::~Slave()
{
- // TODO(benh): Shut down and free frameworks?
+ // TODO(benh): Shut down frameworks?
- // TODO(benh): Shut down and free executors? The executor should get
- // an "exited" event and initiate a shut down itself.
+ // TODO(benh): Shut down executors? The executor should get an "exited"
+ // event and initiate a shut down itself.
+
+ foreachvalue (Framework* framework, frameworks) {
+ foreachvalue (Executor* executor, framework->executors) {
+ delete executor;
+ }
+ delete framework;
+ }
}