aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger
diff options
context:
space:
mode:
authorGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-07 15:08:33 +0000
committerGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-07 15:08:33 +0000
commit9cda6f753c913453b5a793836bf17a74bf0e6c49 (patch)
tree673f466bcb2f76c2bac54436f415e223dde67200 /debugger
parent3de7acc180e37c7c513f2b3425bd4616ea47fa57 (diff)
Quick mem fix for debug canvas leaking when loading new pics.
Review URL: https://codereview.appspot.com/6454096 git-svn-id: http://skia.googlecode.com/svn/trunk@4975 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'debugger')
-rw-r--r--debugger/SkDebugCanvas.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/debugger/SkDebugCanvas.cpp b/debugger/SkDebugCanvas.cpp
index 47734b1bd9..6371f111e0 100644
--- a/debugger/SkDebugCanvas.cpp
+++ b/debugger/SkDebugCanvas.cpp
@@ -23,7 +23,12 @@ SkDebugCanvas::SkDebugCanvas(int width, int height) {
fUserScale = 1.0;
}
-SkDebugCanvas::~SkDebugCanvas() {}
+SkDebugCanvas::~SkDebugCanvas() {
+ for (int i = 0; i < commandVector.size(); i++) {
+ delete(commandVector[i]);
+ }
+ commandVector.clear();
+}
void SkDebugCanvas::addDrawCommand(SkDrawCommand* command) {
commandVector.push_back(command);