From c1597031bf32764454f4ed40d2e6a24f6aef3e1f Mon Sep 17 00:00:00 2001 From: "antonm@chromium.org" Date: Wed, 17 Mar 2010 14:42:01 +0000 Subject: [PATCH] Properly release zero-length Vectors. Review URL: http://codereview.chromium.org/987004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.h b/src/utils.h index 3c8d873..4a9d871 100644 --- a/src/utils.h +++ b/src/utils.h @@ -341,8 +341,8 @@ class Vector { // Releases the array underlying this vector. Once disposed the // vector is empty. void Dispose() { - if (is_empty()) return; DeleteArray(start_); + if (is_empty()) return; start_ = NULL; length_ = 0; } -- 2.7.4