Pointer to memory
I have an array declared with new operator, and I pass it to a function. That receives it as a pointer parameter. Now in this function I have an other dynamic array to store result. Problem is : Memory of passed array should be free in the end of this function, its pointer should point the allocated memory in this function and it can b used in calling function without return pointer to memory.