equal
deleted
inserted
replaced
90 |
90 |
91 /* |
91 /* |
92 * Overloaded 'operator new[]' variant, which will raise Java's |
92 * Overloaded 'operator new[]' variant, which will raise Java's |
93 * OutOfMemoryError in the case of a failure. |
93 * OutOfMemoryError in the case of a failure. |
94 */ |
94 */ |
95 static void* operator new[](std::size_t size, JNIEnv *env) |
95 void* operator new[](std::size_t size, JNIEnv *env) |
96 { |
96 { |
97 void* buf = ::operator new[](size, std::nothrow); |
97 void* buf = ::operator new[](size, std::nothrow); |
98 if (buf == NULL) { |
98 if (buf == NULL) { |
99 ThrowExceptionWithMessage(env, OUT_OF_MEMORY_ERROR, |
99 ThrowExceptionWithMessage(env, OUT_OF_MEMORY_ERROR, |
100 "Native memory allocation failed"); |
100 "Native memory allocation failed"); |