Branch: Tag:

2008-01-30

2008-01-30 13:29:55 by Per Hedbor <ph@opera.com>

Tried to clean up the memory handling. At least valgrind is reasonably silent now. :-) This should actually be done for GTK1 too, but it's not as essential.

Rev: src/post_modules/GTK2/build_pgtk.pike:1.14
Rev: src/post_modules/GTK2/pgtk.h:1.18
Rev: src/post_modules/GTK2/source/gdkbitmap.pre:1.7
Rev: src/post_modules/GTK2/source/gdkcolor.pre:1.6
Rev: src/post_modules/GTK2/source/gdkcolormap.pre:1.5
Rev: src/post_modules/GTK2/source/gdkdisplay.pre:1.11
Rev: src/post_modules/GTK2/source/gdkdragcontext.pre:1.5
Rev: src/post_modules/GTK2/source/gdkevent.pre:1.11
Rev: src/post_modules/GTK2/source/gdkgc.pre:1.15
Rev: src/post_modules/GTK2/source/gdkimage.pre:1.7
Rev: src/post_modules/GTK2/source/gdkpixbuf.pre:1.21
Rev: src/post_modules/GTK2/source/gdkpixbufanimation.pre:1.6
Rev: src/post_modules/GTK2/source/gdkpixmap.pre:1.6
Rev: src/post_modules/GTK2/source/gdkrectangle.pre:1.9
Rev: src/post_modules/GTK2/source/gdkregion.pre:1.5
Rev: src/post_modules/GTK2/source/gdkscreen.pre:1.8
Rev: src/post_modules/GTK2/source/gdkvisual.pre:1.3
Rev: src/post_modules/GTK2/source/gdkwindow.pre:1.7
Rev: src/post_modules/GTK2/source/gtkcelllayout.pre:1.5
Rev: src/post_modules/GTK2/source/gtkcellview.pre:1.11
Rev: src/post_modules/GTK2/source/gtkclipboard.pre:1.6
Rev: src/post_modules/GTK2/source/gtkcolorbutton.pre:1.10
Rev: src/post_modules/GTK2/source/gtkiconinfo.pre:1.6
Rev: src/post_modules/GTK2/source/gtkicontheme.pre:1.8
Rev: src/post_modules/GTK2/source/gtkpapersize.pre:1.4
Rev: src/post_modules/GTK2/source/gtkrecentinfo.pre:1.5
Rev: src/post_modules/GTK2/source/gtktextattributes.pre:1.8
Rev: src/post_modules/GTK2/source/gtktextiter.pre:1.12
Rev: src/post_modules/GTK2/source/gtktextmark.pre:1.7
Rev: src/post_modules/GTK2/source/gtktextview.pre:1.9
Rev: src/post_modules/GTK2/source/gtktreeiter.pre:1.6
Rev: src/post_modules/GTK2/source/gtktreepath.pre:1.9
Rev: src/post_modules/GTK2/source/gtktreerowreference.pre:1.7
Rev: src/post_modules/GTK2/source/gtktreeview.pre:1.11
Rev: src/post_modules/GTK2/source/pangocontext.pre:1.7
Rev: src/post_modules/GTK2/source/pangofontdescription.pre:1.8
Rev: src/post_modules/GTK2/source/pangolayoutiter.pre:1.7
Rev: src/post_modules/GTK2/source/pangotabarray.pre:1.7
Rev: src/post_modules/GTK2/source/support.c:1.20

26:    THIS->obj=(void *)pango_font_description_from_string(str);    else    THIS->obj=(void *)pango_font_description_new(); +     pgtk2_pop_n_elems(args);    } else    THIS->obj=(void *)pango_font_description_new(); -  +  +  THIS->owned = 1;    pgtk2__init_this_object();   }   
40:    PangoFontDescription *pfd=pango_font_description_copy(    (PangoFontDescription *)THIS->obj);    pgtk2_pop_n_elems(args); -  push_gobjectclass(pfd,ppango2_font_description_program); +  push_pgdk2object(pfd,ppango2_font_description_program,1);    }   }   
62:      void destroy()   { -  if (THIS->obj) +  if (THIS->obj && THIS->owned)    pango_font_description_free((PangoFontDescription *)THIS->obj);    THIS->obj=0;    pgtk2_pop_n_elems(args);