memory manager cleanup and removal

This commit is contained in:
DarthArgus
2016-12-04 00:55:37 +00:00
parent 23cf1cc584
commit 9f9fed4693
25 changed files with 39 additions and 107 deletions
@@ -71,7 +71,7 @@ char *SetupSharedXmlNamespace::xmlDuplicateString(char const *source)
void *SetupSharedXmlNamespace::xmlReAllocate(void *memory, size_t byteCount)
{
return MemoryManager::reallocate(memory, byteCount);
return realloc(memory, byteCount);
}
// ======================================================================
@@ -116,18 +116,9 @@ XmlTreeDocument const *XmlTreeDocumentList::fetch(CrcString const &filename)
delete file;
//-- Create an XML DOM tree out of it.
#ifdef _DEBUG
unsigned long const preDomBytesAllocated = MemoryManager::getCurrentNumberOfBytesAllocated();
#endif
xmlDocPtr const xmlDocument = xmlParseMemory(reinterpret_cast<char const *>(fileContents), fileSize);
FATAL(!xmlDocument, ("xmlParseMemory() returned nullptr when parsing contents of file [%s].", cPathName));
#ifdef _DEBUG
unsigned long const postDomBytesAllocated = MemoryManager::getCurrentNumberOfBytesAllocated();
DEBUG_REPORT_LOG(s_logXmlDomTreeSize, ("XmlTreeDocumentList: XML tree file [%s]: XML DOM tree appears to have consumed [%d] bytes.\n", cPathName, static_cast<int>(postDomBytesAllocated - preDomBytesAllocated)));
#endif
// Release initial file contents buffer.
delete [] fileContents;