ICU-2030 Sun Forte really dislikes most of the new and delete functions.
X-SVN-Rev: 9425
This commit is contained in:
parent
7d211e9031
commit
d9121cfa14
@ -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
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user