I've written a program that uses a large amount of memory. This involves many linked lists made up of structures that contain pointers such as
These pointers are used during the execution with allocation calls to malloc.
My question is that when I free a structure like this can I just free the pointer to the structure (e.g. to free the next record of the linked list could I just call free on apple->next) or do I have to free all the pointers in the structure first.
thanks for any help