hi
a variable is allocated in dynamic memory(using new and is not deleted) and the programs gets terminated .now does the memory allocated will become junk.
if the above program is executed it just allocates 4 bytes in heap and the program gets terminated.
does this allocated memory will never be free even after program termination.
a variable is allocated in dynamic memory(using new and is not deleted) and the programs gets terminated .now does the memory allocated will become junk.
Code:
int main()
{
int *i = new int;
}
does this allocated memory will never be free even after program termination.
Comment