FILE *pFile for file I/O (all the way from
fopen(pFile, ...) to
fclose(pFile) ), my
pFile pointer still points to
0x7803a710 . So I figured I better free it.
However, when I try
free(pFile) , it pauses execution (while debugging - though no breakpoint is set). When I hit F5 again (continue execution) & check the value of
pFile , it is still
0x7803a710 . I was expecting it to be freed to
Does anyone know how to free a FILE pointer? Thanks
Jump to Post
>it is still 0x7803a710. I was expecting it to be freed to 0x00000000.
Your expectation is not realistic. Freeing some memory do not mean
that is zero out. It means that is available for other uses.
A perfect example would be if you declare an int variable and do …
All 2 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.