aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm5
1 files changed, 2 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 5c89ed765..64dffbd4f 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1844,7 +1844,7 @@ void ScintillaCocoa::PaintMargin(NSRect aRect)
PRectangle rc = NSRectToPRectangle(aRect);
rcPaint = rc;
- Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
+ std::unique_ptr<Surface> sw(Surface::Allocate(SC_TECHNOLOGY_DEFAULT));
if (sw)
{
CGContextSetAllowsAntialiasing(gc,
@@ -1855,9 +1855,8 @@ void ScintillaCocoa::PaintMargin(NSRect aRect)
vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
sw->Init(gc, wMargin.GetID());
- PaintSelMargin(sw, rc);
+ PaintSelMargin(sw.get(), rc);
sw->Release();
- delete sw;
}
}