Tk Source Code

View Ticket
Login
Ticket UUID: 0502c1eef5f07c6deb2fc366ce84c1773cb533e3
Title: Aqua: fix NSAttributedString leak in TkpConfigureMenuEntry()
Type: Patch Version: 8.6.11
Submitter: chrstphrchvz Created on: 2023-07-10 13:44:01
Subsystem: 11. Aqua Menus Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2023-07-16 20:23:36
Resolution: Fixed Closed By: fvogel
    Closed on: 2023-07-16 20:23:36
Description:

NSAttributedString *attributedTitle was autoreleased prior to [4e5bba9cee2c]. However it should be fine to use ordinary release instead. See attached patch.

User Comments: fvogel added on 2023-07-16 20:23:36:

The link provided by Christopher in [another ticket] discusses autorelease vs release.


fvogel added on 2023-07-15 09:06:40:
I have now merged Christopher's patch.

Leaving the ticket open for the moment, pending Christopher's answer to my question below.

fvogel added on 2023-07-14 20:07:03:
As I understand it, there is a leak since neither release nor autorelease is used at the moment on attributedTitle.

That is, one or the other should be used. What is the reason to favor ordinary release over autorelease?

Attachments: