ICU-2030 Sun Forte really dislikes most of the new and delete functions.

X-SVN-Rev: 9425
This commit is contained in:
George Rhoten 2002-07-30 01:42:26 +00:00
parent 7d211e9031
commit d9121cfa14
2 changed files with 10 additions and 5 deletions

View File

@ -69,11 +69,14 @@ public:
#define U_CPP_MEMORY_TEST
#ifdef U_CPP_MEMORY_TEST
void *operator new(size_t size);
void *operator new[](size_t size);
void operator delete(void *p);
#if 0
/* Sun Forte really dislikes these functions. */
void *operator new[](size_t size);
void operator delete[](void *p);
void operator delete(void *p, size_t size);
void operator delete[](void *p, size_t size);
#endif
#endif
/**

View File

@ -60,16 +60,17 @@ void *UObject::operator new(size_t size) {
return uprv_malloc(size);
}
void *UObject::operator new[](size_t size) {
return uprv_malloc(size);
}
void UObject::operator delete(void *p) {
if(p!=NULL) {
uprv_free(p);
}
}
#if 0
void *UObject::operator new[](size_t size) {
return uprv_malloc(size);
}
void UObject::operator delete[](void *p) {
if(p!=NULL) {
uprv_free(p);
@ -87,6 +88,7 @@ void UObject::operator delete[](void *p, size_t /* size */) {
uprv_free(p);
}
}
#endif
#endif