I\'m investigating a memory leak and from what I see, the problem looks like this:
int main(){ char *cp = 0; func(cp); //code delete[] cp; } voi
The function is only changing a COPY of cp. Use a reference instead.
cp