You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2013/12/11 23:34:06 UTC
[jira] [Created] (MESOS-877) Future::then and Promise::associate
have memory leaks.
Jie Yu created MESOS-877:
----------------------------
Summary: Future::then and Promise::associate have memory leaks.
Key: MESOS-877
URL: https://issues.apache.org/jira/browse/MESOS-877
Project: Mesos
Issue Type: Bug
Affects Versions: 0.16.0
Reporter: Jie Yu
Fix For: 0.17.0
As commented in Future::then, there is a memory leak (cyclic dependency). Recently, the change in Promise::associate (https://issues.apache.org/jira/browse/MESOS-807) makes it worse.
// TODO(benh): Need to pass 'future' as a weak_ptr so that we can
// avoid reference counting cycles!
std::tr1::function<void(void)> discard =
std::tr1::bind(&Future<T>::discard, *this);
promise->future().onDiscarded(discard);
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)