mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8234779: Provide idiom for declaring classes noncopyable
Add NONCOPYABLE macro and uses. Reviewed-by: dholmes, pliden, coleenp
This commit is contained in:
parent
3e0a524547
commit
577e87e5b2
37 changed files with 101 additions and 131 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "memory/metaspace.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
// Array for metadata allocation
|
||||
|
||||
|
@ -49,9 +50,7 @@ protected:
|
|||
}
|
||||
|
||||
private:
|
||||
// Turn off copy constructor and assignment operator.
|
||||
Array(const Array<T>&);
|
||||
void operator=(const Array<T>&);
|
||||
NONCOPYABLE(Array);
|
||||
|
||||
void* operator new(size_t size, ClassLoaderData* loader_data, int length, TRAPS) throw() {
|
||||
size_t word_size = Array::size(length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue