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:
parent
3de7acc180
commit
9cda6f753c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user