Re: strtok buffer question
- From: "soccertl" <lambert54@xxxxxxx>
- Date: 25 Aug 2006 08:39:25 -0700
From looking at the source code it looks like tsdalloc allocates memorywith lmalloc but it is not clear when this memory gets freed. This
makes me worried that the caller is suppose to do something to free
this memory but I have not seen that mentioned anywhere.
I wasn't aware that strtok actually allocated memory.
Well, I found a different strtok in the open source link that I think
works more like I expected. It doesn't allocate memory and just saves
the pointer in a static variable. That makes more sense and I see how
it works now.