From d9121cfa14917728322dd12d85acc0725e571e3f Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Tue, 30 Jul 2002 01:42:26 +0000 Subject: [PATCH] ICU-2030 Sun Forte really dislikes most of the new and delete functions. X-SVN-Rev: 9425 --- icu4c/source/common/unicode/uobject.h | 5 ++++- icu4c/source/common/uobject.cpp | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/icu4c/source/common/unicode/uobject.h b/icu4c/source/common/unicode/uobject.h index d47ade8c8d..1f8fbef857 100644 --- a/icu4c/source/common/unicode/uobject.h +++ b/icu4c/source/common/unicode/uobject.h @@ -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 /** diff --git a/icu4c/source/common/uobject.cpp b/icu4c/source/common/uobject.cpp index 46447d7763..d0db4418cf 100644 --- a/icu4c/source/common/uobject.cpp +++ b/icu4c/source/common/uobject.cpp @@ -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