Hi. Suppose u have the following function:

Code:
int *temp(int n){
  int i;
  int *array = new int[n];
     for (i=0;i<n;i++)
   array[i] = i;
  return array;
}
If i call the above function in main like this:
Code:
temp(1000000);
4Mbytes of memory are allocated, even though the result of temp() is not returned to another pointer. Why? Can I "free" that memory?
Thanx