Should I free strtok() results?

Peter C. Bahrs pcb at
Tue Apr 10 15:17:18 AEST 1990

The string functions that return pointers to memory, should their
results be freed?

Most (if not all) of the sample code in QuickC using these do
not free the results.  In fact, most code that I have seen
anywhere, these are not freed.  It only makes sense to free them though.

Any ideas?

/*----------- Thanks in advance... --------------------------------------+
| Peter C. Bahrs                                                         |
| The USL-NASA Project                                                   |
| Center For Advanced Computer Studies      INET: pcb at |
| 2 Rex Street                                                           |
| University of Southwestern Louisiana      ...!uunet!dalsqnt!gator!pcb  | 
| Lafayette, LA 70504                                                    |

More information about the Comp.lang.c mailing list