Memeory leak when sending a new dbus signal

Priya Raghavendra Priya_Raghavendra at mindtree.com
Fri Jun 12 00:45:56 PDT 2009


Hi.

We are using the following APIs to create a DBUS signal and send the DBUS signal. But we see that there is a memory leak every time a new dbus signal is created and sent. So in our application the memory utilization progressively increases and the application crashed after sometime due to lack of memory.
?       Are we missing some step here to free memory?
?        Is there any other API which should be called which frees the memory once a signal has been sent?

Thanks,
Priya

    DBusMessage *msg;
    DBusMessageIter args;

    /* create a signal & check for errors */
    msg = dbus_message_new_signal(ObjectName, // object name of the signal
                                  InterfaceName, // interface name of the signal
                                  MessageName); // name of the signal

    if (NULL == msg)
    {
        fprintf(stderr, "Message Null\n");
    }
    dbus_message_iter_init(msg, &args);

    // send the message and flush the connection
    if (!dbus_connection_send(conn, msg, &serial))
    {
        fprintf(stderr, "Out Of Memory!\n");
        exit(1);
    }
    dbus_connection_flush(conn);
    dbus_message_unref(msg);


________________________________
http://www.mindtree.com/email/disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090612/c080a1a0/attachment.htm 


More information about the dbus mailing list