Re: strtok buffer question




soccertl wrote:
From looking at the source code it looks like tsdalloc allocates memory
with 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.

.