instruments

Memory Leak using an UIAlertController in Swift

不羁的心 提交于 2019-12-23 13:21:00
问题 I present a simple UIViewController using this simple code @IBAction func addNewFeed(sender: UIBarButtonItem) { var alertView: UIAlertController? = UIAlertController(title: NSLocalizedString("New Feed", comment: "Titolo popup creazione feed"), message: NSLocalizedString("Insert the Title and the Link for the new Feed.", comment: "Messaggio creazione nuovo feed"), preferredStyle: UIAlertControllerStyle.Alert) alertView!.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment:

Xcode 9.3 and update to High Sierra: Instruments can't open *.tracetemplate files even after full reinstall

僤鯓⒐⒋嵵緔 提交于 2019-12-23 10:27:29
问题 With the last update of Xcode to 9.3 running on High Sierra, I realized that Instruments is not working any more. When I try to open it from inside Xcode using Open Developer Tool > Instruments , I can see the template chooser dialog but as soon I pick one, a dialog appears: The document "Allocations.tracetemplate" could not be opened. Instruments cannot open files of this type. Allocations.tracetemplate could not be handled because Instruments cannot open files of this type. This happens

Xcode Instruments output interpretation for iPad app

天大地大妈咪最大 提交于 2019-12-23 04:52:30
问题 In the Instruments under Allocations, for the "All Allocations" line the "Live Bytes" and "Overall Bytes" show a very small amount of memory (~2.5MB) and they seem to be very stable. But the "# Living" and "# Overall" keep going up gradually. Question: Which columns are more important in term of finding out memory footprint for my app? What are differences between "Live Bytes" vs "# Living" and "Overall Bytes" vs "# Overall"? BTW: Instruments shows no leaks memory at all. Thank you. 回答1: The

Instruments error: Connection peer refused channel request

こ雲淡風輕ζ 提交于 2019-12-23 02:58:24
问题 Running Instruments from the command line I started getting this: instruments[2387:30342] Connection peer refused channel request for "com.apple.instruments.server.services.wireless"; channel canceled <DTXChannel: 0x7fa7116b7a10> Any idea what the problem is and how to fix? 回答1: I'm also doing some research to find out the root cause of the problem. However, making sure Instruments is not running and/or restarting the device solved the issue. 来源: https://stackoverflow.com/questions/28763961

How to start/stop Instruments (Time Profiler) programatically?

两盒软妹~` 提交于 2019-12-23 02:29:07
问题 Is there any way to start/stop Instruments profiling programmatically ? I need to profile just a specific section of my OS X code in a reliable way but I can't seem to find any documentation for Instruments which might tell me how I might do this. With CHUD/Shark there was a programming API and a command line tool to support this but I don't see the equivalent for Instruments anywhere ? FWIW I found some old forum posts from around 2009 bemoaning the lack of Instruments functionality in this

XCode Instruments 6 (by far) not reflecting the correct amount of memory

空扰寡人 提交于 2019-12-23 02:19:12
问题 I've a huge difference between the amount of used memory displayed in XCode debug panel and the same info in Instruments. XCode shows 400 MB of allocated memory when Instruments only shows 42MB. I'm certainly closer to 400 than 42 as I've multiples 32MB textures loaded... (And this time, 42 is not the answer, btw) XCode 6.0.1, iPad 3, iPhone 5S, iOS 7.1.2 on both, Profiling on real devices, but no problem doing the same thing on simulator. Not an ideal situation to track memory consumption.

Lot of strange leaks in instruments only on device (no leaks in simulator)

巧了我就是萌 提交于 2019-12-22 09:49:27
问题 I started working with instruments and have a lot of leaks. I don't have an idea how to solve them. Instrument show that i have leak in this line: NSArray *topLevelObjects = [[NSArray alloc] initWithArray:[[NSBundle mainBundle] loadNibNamed:@"SearchResultsTableViewCell" owner:self options:nil]]; What is wrong with this? // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString

IPhone: Resources to learn 'instruments'?

和自甴很熟 提交于 2019-12-22 08:53:14
问题 I'd like to use instruments to verify is my program doesn't have any memory leaks. Can you please provide me with some resources or tips that helped you as you were trying to figure this out? Maybe some video screencasts, or something. This program is pretty complicated and I'm not too familiar with such low level profiling utils so maybe you found a nice easy to understand tutorial as you were going through this? 回答1: Cocoa Tutorial: Fixing Memory Leaks With Instruments Instruments also

iPhone memory warnings and crashes - but Instruments showing lowish memory use

泪湿孤枕 提交于 2019-12-22 05:40:13
问题 I have a strange memory issue I'm having problems resolving and would appreciate some advice as to where else to look. The program I have (iPhone App) has a function whereby it basically downloads loads of files, processes those that are JSON, and stores the rest to disk. The JSON processing is CPU intensive and can take several seconds per file, so I have a NSOperationQueue with maxConcurrency limited to 1 that handles all the heavy lifting, and a queue that manages the multiple files to

Difference between virtual memory consumption and real memory with Memory Monitor on iOS

…衆ロ難τιáo~ 提交于 2019-12-22 05:32:01
问题 I am stuck with an issue in my app. I have been testing up until now mostly on my iPad 3 with occasional checks on my iPad 1 to make sure all is well. I am playing a UIImageView animation in my app and it keeps quitting with only a "Received memory warning" message before it quits. I have been using the Object Allocations tool in instruments but according to that, my memory usage is way low. So after researching for a bit I came across this post by Mr. Larson: https://stackoverflow.com/a