use macro to get operator new correct
git-svn-id: svn://10.0.0.236/trunk@22203 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2e06c0f14a
commit
31f557d779
@ -42,11 +42,7 @@ public:
|
||||
RobotSink();
|
||||
~RobotSink();
|
||||
|
||||
void* operator new(size_t size) {
|
||||
void* rv = ::operator new(size);
|
||||
nsCRT::zero(rv, size);
|
||||
return (void*) rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -42,11 +42,7 @@ public:
|
||||
RobotSink();
|
||||
~RobotSink();
|
||||
|
||||
void* operator new(size_t size) {
|
||||
void* rv = ::operator new(size);
|
||||
nsCRT::zero(rv, size);
|
||||
return (void*) rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@ -36,12 +36,7 @@ class nsView : public nsIView
|
||||
public:
|
||||
nsView();
|
||||
|
||||
// Overloaded new operator. Initializes the memory to 0
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
||||
|
||||
@ -35,11 +35,7 @@ class nsViewManager : public nsIViewManager
|
||||
public:
|
||||
nsViewManager();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user