Can't delete file data after using it.

I open XML files with TinyXML2 and the getFileData function. The problem is that when it comes time to delete the file it crashes. Does Cocos2d-x do something behnd the scenes to cleanup? Here’s my code:
@
std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(filepath.c_str());
unsigned char* pBuffer = NULL;
unsigned long bufferSize = 0;
pBuffer = CCFileUtils::sharedFileUtils()->getFileData(fullPath.c_str(), “r”, &bufferSize);

if (pBuffer)
{
//Load data
///////////////////////////////////////////////////////////////////////////////////////////////////
//various tinyxml stuff…
///////////////////////////////////////////////////////////////////////////////////////////////////

delete[] pBuffer;
}
@

Cocos2d doesn’t but maybe TinyXML does? As you can see in CCFileUtils source the buffer is created with simple new[] and nowhere is stored.