Re: why no gtk_tree_iter_new()?



On Fri, 2001-11-02 at 00:52, James Henstridge wrote:
> The tree iter filled in by gtk_tree_store_append is owned by the caller. 
>  It is responsible for freeing it (if necessary).  Unlike iters 
> allocated on the heap, you can't really transfer ownership of an iter 
> allocated on the stack.  This is no more dangerous than the possibility 
> of a program calling free() on an object it allocated on the stack.
> 
> If you are wondering about how to wrap the function, in python all 
> functions that logically create GtkTextIters or GtkTreeIters, I changed 
> them to return the iter, rather than taking a reference to it as an 
> argument.  This may be appropriate for the C++ binding as well.

Yes, that's what I did.

-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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