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

Unified Diff: site/user/sample/building.md

Issue 1319703004: Fix memory leak in build example (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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: site/user/sample/building.md
diff --git a/site/user/sample/building.md b/site/user/sample/building.md
index 92865d17b8a57b8b724452334d3bf5afe9ca4d79..2fed87f374c84c52e9654afe13b24f16b2ea39fe 100644
--- a/site/user/sample/building.md
+++ b/site/user/sample/building.md
@@ -260,10 +260,10 @@ int main(int argc, char** argv) {
SkPaint paint;
paint.setColor(SK_ColorRED);
- SkString* str = new SkString();
- paint.toString(str);
+ SkString str;
+ paint.toString(&str);
- fprintf(stdout, "%s\n", str->c_str());
+ fprintf(stdout, "%s\n", str.c_str());
return 0;
}
@@ -317,4 +317,3 @@ sync.
Adding the above to the end of DEPS and running gclient sync should show the
GYP files being updated at the end of the sync procedure.
-
« 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