From 489d483090167a45b26cf5f4ec3304dc1e1cc064 Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Mon, 18 Aug 2014 09:58:58 -0700 Subject: No need to release m_pBaseCS in CPDF_IndexedCS and CPDF_PatternCS m_pBaseCS will be released in CPDF_DocPageData::Clear. BUG=401372 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/472653002 --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp index 6c2701f5f7..da48093135 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp @@ -754,10 +754,6 @@ CPDF_IndexedCS::~CPDF_IndexedCS() if (m_pCompMinMax) { FX_Free(m_pCompMinMax); } - CPDF_ColorSpace* pCS = m_pBaseCS; - if (pCS && m_pDocument) { - m_pDocument->GetPageData()->ReleaseColorSpace(pCS->GetArray()); - } } FX_BOOL CPDF_IndexedCS::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) { @@ -837,10 +833,6 @@ CPDF_PatternCS::CPDF_PatternCS() } CPDF_PatternCS::~CPDF_PatternCS() { - CPDF_ColorSpace* pCS = m_pBaseCS; - if (pCS && m_pDocument) { - m_pDocument->GetPageData()->ReleaseColorSpace(pCS->GetArray()); - } } FX_BOOL CPDF_PatternCS::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) { -- cgit v1.2.3