Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2079)

Unified Diff: gm/gmmain.cpp

Issue 13929019: Delete gm after use. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index a91a28fa6c049400fc6c87228d4c1f282d3d9f26..4979d79a544ac381633c808389225bcab015dfb5 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1807,7 +1807,7 @@ int tool_main(int argc, char** argv) {
Iter iter;
GM* gm;
while ((gm = iter.next()) != NULL) {
-
+ SkAutoTDelete<GM> adgm(gm);
++gmIndex;
if (moduloRemainder >= 0) {
if ((gmIndex % moduloDivisor) != moduloRemainder) {
@@ -1818,7 +1818,6 @@ int tool_main(int argc, char** argv) {
const char* shortName = gm->shortName();
if (skip_name(FLAGS_match, shortName)) {
- SkDELETE(gm);
continue;
}
@@ -1837,8 +1836,6 @@ int tool_main(int argc, char** argv) {
// TODO(epoger): only run this if gmmain.generate_image() succeeded?
// Otherwise, what are we comparing against?
run_multiple_modes(gmmain, gm, compareConfig, comparisonBitmap, tileGridReplayScales);
-
- SkDELETE(gm);
}
SkTArray<SkString> modes;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698