Why there's no delete proxy in the ctaskbrowser?

Hello,
In ctaskbrowser.cpp, why the "TaskContext * proxy" created with
ControlTaskProxy::Create(...) is not explicitly deleted ? Is there a memory
leak or the proxy is automaticaly deleted elsewhere?

Thank you,

Philippe Hamelin

Why there's no delete proxy in the ctaskbrowser?

On Thu, Apr 30, 2009 at 22:01, Philippe Hamelin
<philippe [dot] hamelin [..] ...> wrote:
> Hello,
> In ctaskbrowser.cpp, why the "TaskContext * proxy" created with
> ControlTaskProxy::Create(...) is not explicitly deleted ? Is there a memory
> leak or the proxy is automaticaly deleted elsewhere?

In a way it is a leak. Proxies are never cleaned up because they are cached.This
is to avoid that for each new ControlTask reference, a new proxy
object would need
to be created (which would explode into memory very quickly). The dark
side of this
medal is that the RTT never decides to clean up a ControlTaskProxy. In
principle,
the DestroyOrb function could/should do this, since it also cleans up
the ControlTaskServer
instances...

It is safe to delete a ControlTaskProxy object 'by hand'. In that
case, it is removed from
the cache and will be re-created when necessary.

Peter