I was wondering what is the correct to handle pointers to pointers, that is passing them into a function and delete them on return if the function receiving the pointers creates the memory but does not release it.
Say I have some code as below:
Where ReturnData is defined something like:
*pInbuff = new char;
// load pInBuff with data
What is proper way to free pInBuff? Is it a simple delete pInbuff, delete  pInBuff or something else?