Re: GtkWindow destroy problem



Darin Adler <darin bentspoon com> writes: 
> Perhaps some GTK expert will correct me, but this is how I understand it.
> 

No, you're right.

I still think the finalize handler for GtkObject should g_warning if
the floating flag is set, and the finalize handler for GtkWindow
should complain if the window is still in the toplevel list.
Then people would be forced to actually understand how this works (in
the cases where they are doing it wrong).

Inti (when it worked) had a warning like this:

  if (floating () && 
      object_->ref_count == 1)
    {
      g_warning ("Calling unref() on an object that has only a
  floating reference count. This means that you did not own a
  reference to the object; to obtain a reference, you must call
  ref(). No one owns the floating reference count. Perhaps you meant
  to call sink().");
    }
  
Havoc




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