Memory leak with ConnectionC::D ??

Hi,
Is there a memory leak with ConnectionC class ?. The valgrind tool reports such a memory leak when I create a connection, more exactly with the ConnectionC::callback(...) functions. The detail::CallbackWrapper instance seems to never been deleted. It's related to the ConnectionC::D::syn_ecb member. The high level context is a subscription to a task's event.


void foo()
{
Handle h = atask.events().setupConnction("myevent").callback(this, &MyClass::handle_event).handle();
}

I use RTT 1.4.1. The referenced RTT code is ConnectionC.hpp and cpp. I also notice a developer comment at line 72 (in the cpp file)

I apologize if I missunderstand the handle and connection usage.
Manfred

Memory leak with ConnectionC::D ??

On Wednesday 08 October 2008 11:27:06 manfredehrhart [..] ... wrote:
> Hi,
> Is there a memory leak with ConnectionC class ?. The valgrind tool reports
> such a memory leak when I create a connection, more exactly with the
> ConnectionC::callback(...) functions. The detail::CallbackWrapper instance
> seems to never been deleted. It's related to the ConnectionC::D::syn_ecb
> member. The high level context is a subscription to a task's event.
>
>
> void foo()
> {
> Handle h = atask.events().setupConnction("myevent").callback(this,
> &MyClass::handle_event).handle(); }
>
>
> I use RTT 1.4.1. The referenced RTT code is ConnectionC.hpp and cpp. I also
> notice a developer comment at line 72 (in the cpp file)
>
> I apologize if I missunderstand the handle and connection usage.

Your understanding is correct. And it's a mem-leak. I don't know why the
EventCallBack object is not managed by a shared pointer such that cleanup
would happen automatically once the connection is destroyed.

Would you mind submitting this as a bug ?

Thanks for reporting,
Peter

Memory leak with ConnectionC::D ??

Hi,
bug report done in https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=592
Thanks
Manfred

Memory leak with ConnectionC::D ??

Hi,
bug report done in https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=592
Thanks
Manfred

Memory leak with ConnectionC::D ??

Hi,
Is there a memory leak with ConnectionC class ?. The valgrind tool reports such a memory leak when I create a connection, more exactly with the ConnectionC::callback(...) functions. The detail::CallbackWrapper instance seems to never been deleted. It's related to the ConnectionC::D::syn_ecb member. The high level context is a subscription to a task's event.

void foo()
{
Handle h = atask.events().setupConnction("myevent").callback(this, &MyClass::handle_event).handle();
}

I use RTT 1.4.1. The referenced RTT code is ConnectionC.hpp and cpp. I also notice a developer comment at line 72 (in the cpp file)

I apologize if I missunderstand the handle and connection usage.
Manfred