Re: Reference Counting



Hi,

Matias Torres wrote:
Hi all,

I'm working on some simple app which only use gtk and sqlite libraries 
and i KNOW it's leaking memory.
Would you please help me? (damn beatles!, i shouldn't be listening music 
when writing a mail!)
*- Is there a way to pass a function to free certain struct in a 
GtkTreeModel so GTK frees the allocated space when the model's reference 
count reach to 0? (without registering it as a G_TYPE).*

*- When reference count starts? I read somewhere that it starts when you 
add the widget into a container, is it always this way??? Eg:*

//*No reference counting on GtkEntry*//
    GtkWidget *entry = gtk_entry_new ();
//*Reference counting starts here *//
    gtk_container_add (GTK_CONTAINER (window), entry);/
/* Another doubt: in this case, reference couting starts with 1 or 2? */
/
-* If i get a string from a GtkTreeModel, it gives me a copy or the 
actual pointer to the data?
  

Try http://refdbg.sf.net ! It may take a bit to get started, but its
worth it. Its a very valuable tool to track ref-counts without that you
need to modify your sources.

Stefan

*That's it, thanks in advance. Matias.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
  




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