mirror of
https://github.com/transmission/transmission
synced 2025-03-03 10:15:45 +00:00
(trunk gtk) remove a few very minor memory leaks in the GTK+ client
This commit is contained in:
parent
fae3516d4b
commit
fa94830df1
4 changed files with 16 additions and 4 deletions
|
@ -2,4 +2,4 @@
|
|||
export G_SLICE=always-malloc
|
||||
export G_DEBUG=gc-friendly
|
||||
export GLIBCXX_FORCE_NEW=1
|
||||
valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=48 --log-file=x-valgrind --show-reachable=yes ./transmission -g /tmp/test
|
||||
valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=48 --log-file=x-valgrind --show-reachable=yes ./transmission
|
||||
|
|
|
@ -743,6 +743,17 @@ onLaunchClutchCB( GtkButton * w UNUSED,
|
|||
g_free( url );
|
||||
}
|
||||
|
||||
static void
|
||||
remotePageFree( gpointer gpage )
|
||||
{
|
||||
struct remote_page * page = gpage;
|
||||
|
||||
g_slist_free( page->widgets );
|
||||
g_slist_free( page->auth_widgets );
|
||||
g_slist_free( page->whitelist_widgets );
|
||||
g_free( page );
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
webPage( GObject * core )
|
||||
{
|
||||
|
@ -756,7 +767,7 @@ webPage( GObject * core )
|
|||
page->core = TR_CORE( core );
|
||||
|
||||
t = hig_workarea_create( );
|
||||
g_object_set_data_full( G_OBJECT( t ), "page", page, g_free );
|
||||
g_object_set_data_full( G_OBJECT( t ), "page", page, remotePageFree );
|
||||
|
||||
hig_workarea_add_section_title( t, &row, _( "Web Client" ) );
|
||||
|
||||
|
|
|
@ -910,6 +910,7 @@ tr_window_new( GtkUIManager * ui_mgr, TrCore * core )
|
|||
sexy_icon_entry_set_icon( SEXY_ICON_ENTRY( s ),
|
||||
SEXY_ICON_ENTRY_PRIMARY,
|
||||
GTK_IMAGE( w ) );
|
||||
g_object_unref( w );
|
||||
sexy_icon_entry_set_icon_highlight( SEXY_ICON_ENTRY( s ),
|
||||
SEXY_ICON_ENTRY_PRIMARY, TRUE );
|
||||
#else
|
||||
|
|
|
@ -673,7 +673,7 @@ gtr_thread_func( gpointer data )
|
|||
gdk_threads_leave( );
|
||||
|
||||
if( !more )
|
||||
g_free( data );
|
||||
g_slice_free( struct gtr_func_data, data );
|
||||
|
||||
return more;
|
||||
}
|
||||
|
@ -685,7 +685,7 @@ gtr_idle_add( GSourceFunc function, gpointer data )
|
|||
#if GTK_CHECK_VERSION( 2,12,0 )
|
||||
gdk_threads_add_idle( function, data );
|
||||
#else
|
||||
struct gtr_func_data * d = g_new( struct gtr_func_data, 1 );
|
||||
struct gtr_func_data * d = g_slice_new( struct gtr_func_data );
|
||||
d->function = function;
|
||||
d->data = data;
|
||||
g_idle_add( gtr_thread_func, d );
|
||||
|
|
Loading…
Reference in a new issue