diff options
author | culler <culler> | 2024-07-08 01:26:26 (GMT) |
---|---|---|
committer | culler <culler> | 2024-07-08 01:26:26 (GMT) |
commit | d516c14a8643ea0b488683bd1b4b0e34c9a91f64 (patch) | |
tree | 8dc8daa70af15e931fb8f21147d502a13539277f /macosx/tkMacOSXWm.c | |
parent | 6b412ef050bae794cc765a9d13a415a9912a8142 (diff) | |
download | tk-d516c14a8643ea0b488683bd1b4b0e34c9a91f64.zip tk-d516c14a8643ea0b488683bd1b4b0e34c9a91f64.tar.gz tk-d516c14a8643ea0b488683bd1b4b0e34c9a91f64.tar.bz2 |
Release the CGImageBitmapContext when the ContentView is destroyed.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 875b11c..fbea56b 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1323,8 +1323,9 @@ TkWmDeadWindow( * Avoid redrawing the view after it is released. */ - Tcl_CancelIdleCall(TkMacOSXRedrawViewIdleTask, - (void *) [deadNSWindow contentView]); + TKContentView *deadView = [deadNSWindow contentView]; + Tcl_CancelIdleCall(TkMacOSXRedrawViewIdleTask,(void *) deadView); + CGContextRelease(deadView.tkLayerBitmapContext); [deadNSWindow close]; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults]; |