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

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

Issue 2384883003: Remove CPDF_Object::Release() in favor of direct delete (Closed)
Patch Set: Remove ScopedDict typedefs Created 4 years, 2 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
Index: core/fpdfapi/fpdf_font/fpdf_font.cpp
diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp
index cff5223a008ba749de4f3a1a07ec768c7e2822d3..081929529e26ffecfe98b6ebd3c7043a52abf9c5 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -46,11 +46,8 @@ CFX_StockFontArray::CFX_StockFontArray() {}
CFX_StockFontArray::~CFX_StockFontArray() {
for (size_t i = 0; i < FX_ArraySize(m_StockFonts); ++i) {
- if (!m_StockFonts[i])
- continue;
- CPDF_Dictionary* pFontDict = m_StockFonts[i]->GetFontDict();
- if (pFontDict)
- pFontDict->Release();
+ if (m_StockFonts[i])
+ delete m_StockFonts[i]->GetFontDict();
}
}

Powered by Google App Engine
This is Rietveld 408576698