Commit f700c7e1 authored by ager@chromium.org's avatar ager@chromium.org

Minor cleanup: the smartpointer class should use DeleteArray to

deallocate.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f67fd01c
......@@ -2968,9 +2968,9 @@ SmartPointer<char> String::ToCString(AllowNullsFlag allow_nulls,
}
SmartPointer < char >String::ToCString(AllowNullsFlag allow_nulls,
RobustnessFlag robust_flag,
int* length_return) {
SmartPointer<char> String::ToCString(AllowNullsFlag allow_nulls,
RobustnessFlag robust_flag,
int* length_return) {
return ToCString(allow_nulls, robust_flag, 0, -1, length_return);
}
......
......@@ -41,9 +41,9 @@ class SmartPointer {
// When the destructor of the scoped pointer is executed the plain pointer
// is deleted using delete[]. This implies that you must allocate with
// new[...], not new(...).
inline ~SmartPointer() { if (p) delete [] p; }
// is deleted using DeleteArray. This implies that you must allocate with
// NewArray.
inline ~SmartPointer() { if (p) DeleteArray(p); }
// Copy constructor removes the pointer from the original to avoid double
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment