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
This commit is contained in:
chudy@google.com 2012-08-07 15:08:33 +00:00
parent 3de7acc180
commit 9cda6f753c

View File

@ -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);