summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-18 12:50:41 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-18 12:50:41 -0700
commita039bc2d0142efe9148ed4580ef304b33570b431 (patch)
treebe4bed659f3c1cf50de9552ad58364fe8331c0e9 /fpdfsdk
parente7b2853a4143137803609fe96330d7924c1731ed (diff)
downloadpdfium-a039bc2d0142efe9148ed4580ef304b33570b431.tar.xz
Remove Release() from CXFA_RenderContext
Review-Url: https://codereview.chromium.org/1994733002
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fsdk_mgr.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 40a891ca1e..3f957c7f3f 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -521,14 +521,13 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
static_cast<FX_FLOAT>(pClip.Width()),
static_cast<FX_FLOAT>(pClip.Height()));
gs.SetClipRect(rectClip);
- CXFA_RenderContext* pRenderContext = new CXFA_RenderContext;
+ std::unique_ptr<CXFA_RenderContext> pRenderContext(new CXFA_RenderContext);
CXFA_RenderOptions renderOptions;
renderOptions.m_bHighlight = TRUE;
CXFA_FFPageView* xfaView = pPage->GetXFAPageView();
pRenderContext->StartRender(xfaView, &gs, *pUser2Device, renderOptions);
pRenderContext->DoRender();
pRenderContext->StopRender();
- pRenderContext->Release();
CXFA_FFDocView* docView = xfaView->GetDocView();
if (!docView)
return;