c - How to free pointer's space in memory? -
i have question pointers in c. each pointer has 4 bytes in memory (address). when call malloc() allocates memory , put it's address pointer, free() frees memory pointer pointing to. how can delete pointer (4 bytes) in memory no longer need ? isn't there memory leak ?
the pointer regular variable, means when goes out of scope 4 bytes allocated automatically freed, other variable might have declared on same scope.
Comments
Post a Comment