C Deallocate Memory

Deallocate (free) Memory

When you no longer need a block of memory you should deallocate it. Deallocation is also referred to as “freeing” the memory.

Dynamic memory stays reserved until it is deallocated or until the program ends.

Once the memory is deallocated it can be used by other programs or it may even be allocated to another part of your program.

Continue reading C Deallocate Memory