Re: freeing text



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 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 correct way to document memory management?

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.'

I suppose the advantage of that is that you know for sure one way or
the other. Currently the documentation person may just have forgot about
the issue.

Damon




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