Hello friends..! I just have a doubt in this concept..
I know it is a must to free up memory at the end, when it is allocated in the beginning of any program.. Otherwise, it would become un-usable junk..
Now, my question is what will be the consequence of this code:
Code:
#include <iostream>
using namespace std;
class xxx
{
long long a[1000],b[1000],c[1000],d[1000],e[1000];
};
int main()
{
long long d=0;
xxx *a = new xxx[10000];
xxx *b = new xxx[10000];
// delete []a;
// delete []b;
return 0;
}
This program uses the allocated memory and if i failed to delete those memory, totally 800,000,000 bytes would become waste...
Will this kind of code much harmful to pc..??
How can i recover those wasted memory...??
Please help me in these issues...!!!!