mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 10:28:29 -04:00
operator new[] should return a zeroed class object just like operator new does.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1337 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
981c3e7570
commit
ed8e70aff0
@ -21,9 +21,14 @@ void operator delete(void *p)
|
||||
if (p) free(p);
|
||||
}
|
||||
|
||||
extern "C" void __cxa_pure_virtual()
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
void * operator new[](size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
return(calloc(size, 1));
|
||||
}
|
||||
|
||||
void operator delete[](void * ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user