deallocate.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@137
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
-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);
}
// 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