i have to set some pointer to NULL for a program, do i have run free? could i just say pointer = NULL? does free do anything special?
i have to set some pointer to NULL for a program, do i have run free? could i just say pointer = NULL? does free do anything special?
Free tells the OS that you're not using the memory anymore. You should use free then you should set the pointer to NULL. If you don't free, the OS thinks you're still using the memory, and it's 'lost'.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie