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

Unified Diff: core/fpdfapi/font/fpdf_font.cpp

Issue 2478253002: Revert of Remove CPDF_Object::Release() in favor of direct delete (Closed)
Patch Set: Created 4 years, 1 month 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 | « core/fpdfapi/edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/page/cpdf_contentmark.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/font/fpdf_font.cpp
diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp
index b681edf70b46073e4244812d30d8ab643b8e1a68..c827ea5793bfb5f7897c7d5c408c8c447a372a09 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -47,8 +47,11 @@
CFX_StockFontArray::~CFX_StockFontArray() {
for (size_t i = 0; i < FX_ArraySize(m_StockFonts); ++i) {
- if (m_StockFonts[i])
- delete m_StockFonts[i]->GetFontDict();
+ if (!m_StockFonts[i])
+ continue;
+ CPDF_Dictionary* pFontDict = m_StockFonts[i]->GetFontDict();
+ if (pFontDict)
+ pFontDict->Release();
}
}
« no previous file with comments | « core/fpdfapi/edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/page/cpdf_contentmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698