Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
|
siva
2017/02/22 23:37:16
2017
rmacnak
2017/02/23 19:00:17
Done.
| |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 #ifndef RUNTIME_PLATFORM_ALLOCATION_H_ | |
| 6 #define RUNTIME_PLATFORM_ALLOCATION_H_ | |
| 7 | |
| 8 #include "platform/assert.h" | |
| 9 | |
| 10 namespace dart { | |
| 11 | |
| 12 // Stack allocated objects subclass from this base class. Objects of this type | |
| 13 // cannot be allocated on either the C or object heaps. Destructors for objects | |
| 14 // of this type will not be run unless the stack is unwound through normal | |
| 15 // program control flow. | |
| 16 class ValueObject { | |
| 17 public: | |
| 18 ValueObject() {} | |
| 19 ~ValueObject() {} | |
| 20 | |
| 21 private: | |
| 22 DISALLOW_ALLOCATION(); | |
| 23 DISALLOW_COPY_AND_ASSIGN(ValueObject); | |
| 24 }; | |
| 25 | |
| 26 | |
| 27 // Static allocated classes only contain static members and can never | |
| 28 // be instantiated in the heap or on the stack. | |
| 29 class AllStatic { | |
| 30 private: | |
| 31 DISALLOW_ALLOCATION(); | |
| 32 DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic); | |
| 33 }; | |
| 34 | |
| 35 } // namespace dart | |
| 36 | |
| 37 #endif // RUNTIME_PLATFORM_ALLOCATION_H_ | |
| OLD | NEW |