简体   繁体   中英

Why is QuartzCore reported as leaking in my app?

When I view my app's memory in the xcode memory tool, i see that something called QuartzCore is reported as leaking many times. Each leak ranges from 16-80 bytes.

My code is not referencing this. it's all from withing UIApplicationMain(). So I'm not sure how to control this. Any ideas?

Thank you.

Are you using Instruments with the simulator? The simulator has some memory leaks of its own--you should test for leaks on the device. If it leaks on the device, look at the stack trace to see where you allocated memory (it's not always obvious, but 99% of the time it's an error with your code rather than with the framework).

You should use the the Leaks tool to help you to find memory that you have unintentionally failed to clean up. There may well be memory that you, or framework developers intentionally want to stick around for the entire running duration of an app. Leaks does not know this and will show them as Leaks. If you determine from the Stack Trace that it really wasn't you then you can do nothing about it - even though you would prefer the tool to report zero leaks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM