add NewDeleteOp.cpp on uphone

This commit is contained in:
yangws 2010-08-12 07:29:18 +00:00
parent ff72e4087d
commit 16706df9d7
1 changed files with 82 additions and 0 deletions

82
cocos2dx/NewDeleteOp.cpp Normal file
View File

@ -0,0 +1,82 @@
/*!
* @file NewDeleteOp.cpp
* @author
* @brief
*
* @section Copyright
* =======================================================================<br>
* <br>
* Copyright (c) 2005-2010 Tranzda Technologies Co.,Ltd. <br>
* 2005-2010<br>
* <br>
* PROPRIETARY RIGHTS of Tranzda Technologies Co.,Ltd. are involved in <br>
* the subject matter of this material. All manufacturing, reproduction, <br>
* use, and sales rights pertaining to this subject matter are governed <br>
* by the license agreement. The recipient of this software implicitly <br>
* accepts the terms of the license. <br>
* 使<br>
* ,<br>
* <br>
* <a href="http://www.tranzda.com"> http://www.tranzda.com </a> <br>
* <a mailto="support@tranzda.com">support@tranzda.com</a> <br>
* =======================================================================<br>
*/
#include "ssTypes.h"
#include "TG3_Type.h"
#include "TG3_Memory.h"
#ifdef new
#undef new
#endif
#ifdef delete
#undef delete
#endif
#ifndef _WIN32
#define __cdecl
#endif
void * __cdecl operator new(unsigned int size)
{
return TMalloc(size);
}
void * __cdecl operator new[](unsigned int size)
{
return TMalloc(size);
}
void * __cdecl operator new(unsigned int size, const unsigned short * fileName, int lineNo)
{
return TMallocEx(size, fileName, lineNo);
}
void * __cdecl operator new[](unsigned int size, const unsigned short * fileName, int lineNo)
{
return TMallocEx(size, fileName, lineNo);
}
void __cdecl operator delete(void *p)
{
TFree(p);
}
void __cdecl operator delete[](void *p)
{
TFree(p);
}
void __cdecl operator delete(void *p, const unsigned short * fileName, int lineNo)
{
TFreeEx(p, fileName, lineNo);
}
void __cdecl operator delete[](void *p, const unsigned short * fileName, int lineNo)
{
TFreeEx(p, fileName, lineNo);
}