Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,
I am using C++ for BREW application. I would like to know why we need to overload new/delete operator?

void *operator new( size_t blkSz )
{
return MALLOC( blkSz );

void operator delete( void *pMem )
{
return FREE( pMem );

depending on your compiler you may also want to add exception support.... and thow an out of memory exception...

void *operator new( size_t blkSz )
{
return MALLOC( blkSz );

void operator delete( void *pMem )
{
return FREE( pMem );

depending on your compiler you may also want to add exception support.... and thow an out of memory exception...