Re: Simple GdkFont and GtkStyle question



learfox furry ao net writes:
if I create or copy a GtkStyle of my own.

First when I set its member `font', do I need to gdk_font_unref() the old
font on the GtkStyle (even if it's from gtk_style_new())?

Yes.

When I gdk_font_load() a new, I need to gdk_font_ref() it once right after
loading?

ie:

      style->font = gdk_font_load(...);
      gdk_font_ref(style->font);


No, when you load a font you own one refcount immediately.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]