Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: src/base/smart-pointers.h

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/smart-pointers.h
diff --git a/src/base/smart-pointers.h b/src/base/smart-pointers.h
index df3fcac6626527b15041f95c266ac311a311d807..adda5a64e81d1d5bddf55c5ed6f93ac28f1039a5 100644
--- a/src/base/smart-pointers.h
+++ b/src/base/smart-pointers.h
@@ -83,26 +83,6 @@ class SmartPointerBase {
T* p_;
};
-// A 'scoped array pointer' that calls DeleteArray on its pointer when the
-// destructor is called.
-
-template <typename T>
-struct ArrayDeallocator {
- static void Delete(T* array) { delete[] array; }
-};
-
-
-template <typename T>
-class SmartArrayPointer : public SmartPointerBase<ArrayDeallocator<T>, T> {
- public:
- SmartArrayPointer() {}
- explicit SmartArrayPointer(T* ptr)
- : SmartPointerBase<ArrayDeallocator<T>, T>(ptr) {}
- SmartArrayPointer(const SmartArrayPointer<T>& rhs)
- : SmartPointerBase<ArrayDeallocator<T>, T>(rhs) {}
-};
-
-
template <typename T>
struct ObjectDeallocator {
static void Delete(T* object) { delete object; }
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698