Re: Breakpoint when NSString gets set to a certain value?
Re: Breakpoint when NSString gets set to a certain value?
- Subject: Re: Breakpoint when NSString gets set to a certain value?
- From: Jerry Krinock <email@hidden>
- Date: Sun, 21 Jul 2013 15:22:08 -0700
On 2013 Jul 20, at 01:11, Kyle Sluder <email@hidden> wrote:
> Allocations is more flexible than leaks. You can filter to just include objects that are live at process termination.
OK.
On 2013 Jul 20, at 11:25, Jens Alfke <email@hidden> wrote:
> If you setenv 'MallocStackLogging' in your process, the leaks tool’s output will include a backtrace of the object’s allocation. [See ‘man malloc’ for other useful flags.]
Ah, I wasn't aware that those work together that way. It identified the problem instantly. It was one of those pesky C APIs that return retained objects by reference, and therefore don't have "Create" or "New" in their name. LSGetApplicationForURL(). The pesky behavior is stated in the documentation, but I'd apparently neglected to read it.
Woohoo! Now, after using app for 10 minutes…
Process 32163: 0 leaks for 0 total leaked bytes.
So the leaked URL object was causing the string leaks after all, as I had originally thought.
> (Warning: for obvious reasons, this environment variable will greatly increase the memory usage of your program. Don’t forget to turn it off again afterwards!)
My Xcode 4.6.3 warns me about that by logging a reminder to the console when an app launches under such conditions. Thanks, Xcode.
And thank you, guys.
Jerry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden