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

Unified Diff: source/samples/layout/paragraph.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 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 | « source/samples/layout/layout.vcxproj.filters ('k') | source/samples/legacy/legacy.vcxproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/samples/layout/paragraph.cpp
diff --git a/source/samples/layout/paragraph.cpp b/source/samples/layout/paragraph.cpp
index 65d3e3684239eb5932475c0b1878778897cf4de6..9a92b5876d46b8678f6952fc8841b39bbb2cced1 100644
--- a/source/samples/layout/paragraph.cpp
+++ b/source/samples/layout/paragraph.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
- * Copyright (C) 1999-2007, International Business Machines
+ * Copyright (C) 1999-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -115,6 +115,7 @@ Paragraph::Paragraph(const LEUnicode chars[], int32_t charCount, const FontRuns
paragraphLayout = new ParagraphLayout(pStart, pEnd - pStart, &fr, NULL, NULL, locales, fParagraphLevel, FALSE, status);
if (LE_FAILURE(status)) {
+ delete paragraphLayout;
break; // return? something else?
}
@@ -163,8 +164,12 @@ Paragraph::~Paragraph()
delete /*(LineInfo *)*/ fLines[line];
}
+ for (le_int32 paragraph = 0; paragraph < fParagraphCount; paragraph += 1) {
+ delete fParagraphLayout[paragraph];
+ }
+
LE_DELETE_ARRAY(fLines);
- delete fParagraphLayout;
+ LE_DELETE_ARRAY(fParagraphLayout);
LE_DELETE_ARRAY(fChars);
}
« no previous file with comments | « source/samples/layout/layout.vcxproj.filters ('k') | source/samples/legacy/legacy.vcxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698