On Thu, 29 Jun 2006 22:18:32 +0200
Boris <bbresc512@xxxxxxxxxx> wrote:

how, for example, a function like ctime() works. It looks like it allocates 
char[25] every time it's called without ever freeing the memory.

I think many older functions are written to return a pointer to one of
their local variables. inet_addr is one example I can think of off the
top of my head. It's not really allocating on every call. It just writes
to its local buffer and returns the pointer to it.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].