The host exe load a DLL and invloke a function in it,The function return a memory allocated on heap and return the pointer to host exe.when the deallocated the memory.It will be a error.
DLL
void DoSth(int *& pInt){
pInt =new int[10];
}
Exe
void Main(){
int * pArray=0;
DoSth(pArray);
delete[] pArray;
}
I use VS2008 SP1. windows 7 32bit.
What's the problem?