Note that if you dynamically create a char array with char *retransmissionMsg = newchar[size] you have to delete it with delete it with delete [] retransmissionMsg not delete retransmissionMsg.
Btw i can't see where you're deleting the array in the code you posted above
The snippet you post allocates memory for a variable named retransmissionMsg and deallocates memory through a variable name RTInfo. Since you're allocating something and deallocating something else, there's no way to tell what's wrong there.
Hi fillipe
I updated code,
wat i m trying to do is I m allocating memory for char pointer pointing to chat array(retransmissionMsg), I am putting that pointer in a Queue(u may call it as global queue...). And from another function i m removing first element from queue and after performing some operation i m trying to delete it...
void ArcaFastRetransmissionServerGD :: ProcessNextRequest() is supposed to clear the queue, or just get rid of the one on top?
I think of this sources of error:
_ RequestQueue.removeFirst() not popping or not returning the correct value.
_ Changing RTInfo inside the while (losing the address) (that's why I put the assign inside the while)
Comment the delete [] and check if your program works exactly as is supposed to do.
You can forget about delete and new using string or vector<>