Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

memory leak/increased memory by NSTextField setString

I just put the TextField on UI and call the NSTextField setString, but it is memory usage is increasing.

  • StoryBoard
  • Objective C

put TextField and button to UI set TextField variable to "ABC" in ViewController.h @property (weak) IBOutlet NSTextView* ABC;

on button event function //dispatch_sync(dispatch_get_main_queue(), ^{ [_ABC setString:str]; //});

How to block the memory usage increase?

Also I was check on Instruments app, and there are many malloc 48bytes, its count is almost same with setString count.

Thank you!

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include a test project and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

memory leak/increased memory by NSTextField setString
 
 
Q