Changeset 9916


Ignore:
Timestamp:
Jan 11, 2010, 9:54:54 PM (12 years ago)
Author:
charles
Message:

(trunk gtk) remove a few very minor memory leaks in the GTK+ client

Location:
trunk/gtk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/my-valgrind.sh

    r9486 r9916  
    33export G_DEBUG=gc-friendly
    44export GLIBCXX_FORCE_NEW=1
    5 valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=48 --log-file=x-valgrind --show-reachable=yes ./transmission -g /tmp/test
     5valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=48 --log-file=x-valgrind --show-reachable=yes ./transmission
  • trunk/gtk/tr-prefs.c

    r9868 r9916  
    744744}
    745745
     746static void
     747remotePageFree( gpointer gpage )
     748{
     749    struct remote_page * page = gpage;
     750
     751    g_slist_free( page->widgets );
     752    g_slist_free( page->auth_widgets );
     753    g_slist_free( page->whitelist_widgets );
     754    g_free( page );
     755}
     756
    746757static GtkWidget*
    747758webPage( GObject * core )
     
    757768
    758769    t = hig_workarea_create( );
    759     g_object_set_data_full( G_OBJECT( t ), "page", page, g_free );
     770    g_object_set_data_full( G_OBJECT( t ), "page", page, remotePageFree );
    760771
    761772    hig_workarea_add_section_title( t, &row, _( "Web Client" ) );
  • trunk/gtk/tr-window.c

    r9901 r9916  
    911911                              SEXY_ICON_ENTRY_PRIMARY,
    912912                              GTK_IMAGE( w ) );
     913    g_object_unref( w );
    913914    sexy_icon_entry_set_icon_highlight( SEXY_ICON_ENTRY( s ),
    914915                                        SEXY_ICON_ENTRY_PRIMARY, TRUE );
  • trunk/gtk/util.c

    r9868 r9916  
    674674
    675675    if( !more )
    676         g_free( data );
     676        g_slice_free( struct gtr_func_data, data );
    677677
    678678    return more;
     
    686686    gdk_threads_add_idle( function, data );
    687687#else
    688     struct gtr_func_data * d = g_new( struct gtr_func_data, 1 );
     688    struct gtr_func_data * d = g_slice_new( struct gtr_func_data );
    689689    d->function = function;
    690690    d->data = data;
Note: See TracChangeset for help on using the changeset viewer.