c - Do I need to free the returned pointer from localtime() function? -


i reading manpages time.h. got far:

time_t = time(0); struct tm * local = localtime(&now); 

now can work time, far good, not find information if duty free() variable local or not.

quoting man page

the 4 functions asctime(), ctime(), gmtime() and localtime() return pointer static data , hence not thread-safe. [...]

so, need not free() returned pointer.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -