Patches item #1655057, was opened at 2007-02-08 06:19
Message generated for change (Comment added) made by thekingant
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1655057&group_id=235

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ncurses
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: PeterTang (petertang)
Assigned to: Sadrul Habib Chowdhury (sadrul)
Summary: Patch for gaim_status_destroy

Initial Comment:

void
gaim_status_destroy(GaimStatus *status)
{
        g_return_if_fail(status != NULL);

        if(status->type != NULL)
        {
                gaim_status_type_destroy(status->type);
        }

        g_hash_table_destroy(status->attr_values);

        GAIM_DBUS_UNREGISTER_POINTER(status);
        g_free(status);
}

Note:
I think gaim_status_type_destroy is needed to release 
status->type 

----------------------------------------------------------------------

>Comment By: Mark Doliner (thekingant)
Date: 2007-02-08 11:59

Message:
Logged In: YES 
user_id=20979
Originator: NO

Hmm, I guess you might be right, that does look like a memleak (did you
see my email reply?  You're the same guy that emailed Luke about this a few
days ago, right?)

How did you find the memleak?  Using valgrind?  Have you tested that your
changes don't cause crashes?  Especially when adding and removing accounts
and when signing online and signing offline?

I think it would be better if GaimStatus->type was a reference to one of
the GaimStatusTypes in GaimAccount->status_types rather than a copy of a
GaimStatusType.  See my attached patch to get an idea of what I mean.  I
haven't tested it (I don't have access to a machine that I can compile on
right now).
File Added: possibly_better_memleak_fix.diff

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1655057&group_id=235

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gaim-patches mailing list
Gaim-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gaim-patches

Reply via email to