diff --git a/kitty/core_text.m b/kitty/core_text.m index 6a3699002..398620c24 100644 --- a/kitty/core_text.m +++ b/kitty/core_text.m @@ -376,6 +376,8 @@ render_glyphs(CTFontRef font, unsigned int width, unsigned int height, unsigned CGContextSetTextMatrix(render_ctx, CGAffineTransformIdentity); CGContextSetTextPosition(render_ctx, 0, height - baseline); CTFontDrawGlyphs(font, glyphs, positions, num_glyphs, render_ctx); + CGContextRelease(render_ctx); + GColorSpaceRelease(gray_color_space); } static inline bool