Re: g_strstrip question.
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Harring Figueiredo <harringf yahoo com>
- Cc: gtk_list gtk gtk <gtk-app-devel-list gnome org>
- Subject: Re: g_strstrip question.
- Date: Thu, 05 Dec 2002 10:18:46 -0500
I dont think thats right:
bbbbbbSTRINGZbbbbbZ
^ |
| +--- end of the string is now here.
|
+- Pointer returned is now here.
would be:
STRINGZbbbbbbbbbbbZ
^ |
| +--- end of the string is now here.
|
+- Pointer returned is now here.
This is what g_strchug does when remove leading whitespace.
When I do a g_free, would I have a bit of memory leak ? (Since it would free
only the bytes STRING ?
not true. if you did freed the n'th element of a string the memory
manager would either do nothing or perform random errors;
no one ever allocated `size' memory at n'th location of
a string.
so essentialy if strstrip did that,
not only mem leaks would occur.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]