Re: freeing text

2001-04-26 Thread January Weiner 3
> Do people think that is the correct way to document memory management? The more you write, the better. Memory allocation problems are sometimes hard to track (at least for me) and can cause severe thinking pains for lamers like yours truly -- speaking from my humble experience. I must admit tha

Re: freeing text

2001-04-26 Thread Eric Lemings
Havoc Pennington wrote: > I usually mention it either way, and also we have G_CONST_RETURN now > which will indicate whether you need to free, at least for return > values (though not for out params such as this one). The only thing that a const return value should convey is you can't change the

Re: freeing text

2001-04-24 Thread Havoc Pennington
Eric Lemings <[EMAIL PROTECTED]> writes: > Havoc Pennington wrote: > > > I usually mention it either way, and also we have G_CONST_RETURN now > > which will indicate whether you need to free, at least for return > > values (though not for out params such as this one). > > The only thing that a

Re: freeing text

2001-04-24 Thread Daniel Elstner
On Tue, 24 Apr 2001 13:55:11 -0400 Damon Chaplin <[EMAIL PROTECTED]> wrote: > Or should we also document all functions where you don't have to free > the returned value? e.g. 'The returned string should not be freed.' You should! Because freeing such a pointer would be dangerous. Regards, Danie

Re: freeing text

2001-04-24 Thread Havoc Pennington
Damon Chaplin <[EMAIL PROTECTED]> writes: > > For the docs I wrote, if you had to free a returned value it said > something > like 'You should free the string when you no longer need it.' > And if you didn't have to free it it wasn't mentioned in the docs. > > Do people think that is the correc

Re: freeing text

2001-04-24 Thread Damon Chaplin
Andy Kahn wrote: > Is this (finally) documented? There's really no reason why people who > use an API need to look at the API's source to determine proper > behavior for their applications. For the docs I wrote, if you had to free a returned value it said something like 'You should free the str

Re: freeing text

2001-04-24 Thread Andy Kahn
On Tue, Apr 24, 2001 at 01:36:28PM -0400, Damon Chaplin wrote: > "Dugas, Alan" wrote: > > > > Does anyone know if the text returned by gtk_clist_get_text() needs to be freed > > when done using it? Thanks in advance to any who reply. > > You can tell quite easily from looking at the gtk_clist_g

Re: freeing text

2001-04-24 Thread Damon Chaplin
"Dugas, Alan" wrote: > > Does anyone know if the text returned by gtk_clist_get_text() needs to be freed > when done using it? Thanks in advance to any who reply. You can tell quite easily from looking at the gtk_clist_get_text() code: *text = GTK_CELL_TEXT (clist_row->cell[column])->text;

freeing text

2001-04-24 Thread Dugas, Alan
Does anyone know if the text returned by gtk_clist_get_text() needs to be freed when done using it? Thanks in advance to any who reply. -- Stupid Genius ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.or