Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 145319 Details for
Bug 222260
gtk2 leaks memory on expose
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
testcase to demonstrate leak, compile with gcc -g -o gtk_rc_style_test `pkg-config --cflags --libs gtk+-2.0` gtk_rc_style_test.c
gtk_rc_style_test.c (text/x-csrc), 1.09 KB, created by
Davyd
on 2007-01-11 07:23:25 UTC
(
hide
)
Description:
testcase to demonstrate leak, compile with gcc -g -o gtk_rc_style_test `pkg-config --cflags --libs gtk+-2.0` gtk_rc_style_test.c
Filename:
MIME Type:
Creator:
Davyd
Created:
2007-01-11 07:23:25 UTC
Size:
1.09 KB
patch
obsolete
>#include <gtk/gtk.h> > >static gboolean >change_colour (gpointer data) >{ > GtkWidget *button = GTK_WIDGET (data); > GdkColor colour; > int i; > > /* This is fine */ > /* > gtk_widget_style_get (button, > "cursor-color", &colour, > "separator-height", &i, > NULL); > */ > > /* This seems to leak */ > gdk_window_clear_area_e (button->window, 0, 0, 400, 400); > > /* This also leaks */ > /* > static GdkColor colour = { 0 }; > > gdk_color_parse ("red", &colour); > > colour.red = rand () % 65535; > colour.blue = rand () % 65535; > colour.green = rand () % 65535; > > gtk_widget_modify_bg (button, GTK_STATE_NORMAL, &colour); > */ >} > >int >main (int argc, char **argv) >{ > GtkWidget *window, *button; > > gtk_init (&argc, &argv); > > window = gtk_window_new (GTK_WINDOW_TOPLEVEL); > button = gtk_button_new_with_label ("GTK RC Style Test"); > > gtk_container_add (GTK_CONTAINER (window), button); > > g_signal_connect (window, "destroy", > G_CALLBACK (gtk_main_quit), NULL); > > gtk_widget_show_all (window); > > g_print ("sizeof (GdkColor) = %i\n", sizeof (GdkColor)); > > g_timeout_add (50, change_colour, button); > > gtk_main (); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 222260
: 145319 |
145320