summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDraw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index ec3c963..f8c6ff9 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1175,6 +1175,8 @@ TkScrollWindow(
srcRgn = HIShapeCreateWithRect(&srcRect);
dstRgn = HIShapeCreateWithRect(&dstRect);
ChkErr(HIShapeDifference, srcRgn, dstRgn, dmgRgn);
+ CFRelease(dstRgn);
+ CFRelease(srcRgn);
result = HIShapeIsEmpty(dmgRgn) ? 0 : 1;
}
@@ -1185,10 +1187,6 @@ TkScrollWindow(
TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn);
- /*
- * Mutable shapes are not reference counted, and must be released.
- */
-
CFRelease(dmgRgn);
return result;
}