instruments

How to find C or C++ code leaks using Instruments (Leaks) - Xcode?

蓝咒 提交于 2019-12-21 21:29:17
问题 int* foo = new int[10]; foo = NULL; sleep(60); Instrument is not finding any leak in above code, how do I use Instrument tool to find C or C++ code leaks. I have stack overflowed most of the explanation is based on objective C codes... 回答1: The issue is that compiler will optimize out the call to new in the following code fragment: int* foo = new int[10]; foo = NULL; sleep(60); as it's smart enough to know that it's not being used. If you add code to use foo then compiler won't do this and

New empty iOS app has dozens of memory leaks

廉价感情. 提交于 2019-12-21 11:36:08
问题 Using the Leaks Instruments tool on a new, from-scratch, one-view iOS app reports 23 leaks. This doesn't seem right — am I missing something? Repeated runs yield different leak counts, from 16 to 35. Steps to reproduce follow this screenshot. A similar, unanswered question, was posted at Memory leak in login with amazon sample ios app I'm using Xcode 10.2.1 (10E1001); iOS 12.2 (Simulator & device both show leaks, with or without Reveal activated.) Create fresh one-view iOS app. In Scheme >

Understanding iPhone OpenGL Profiling

自闭症网瘾萝莉.ら 提交于 2019-12-21 10:48:17
问题 My app is up and running and now I am looking to improve the rendering performance. Using 'Instruments' I have collected some data. I am working with an old iPhone 3G as a worst case senario. Time Profiler: -30% CopyVertexElementsMultipleSequential -11% mach_msg_trap -4% _semwait_signal -2% ValidateState However using the Open GL ES Driver, the Sampler reads: -70% _semwait_signal -24% CopyVertexElementsMultipleSequential -0.7% mach_msg_trap Poking around the docs I haven't been able to come

UILabel (CALayer) is using large amounts of virtual memory

半城伤御伤魂 提交于 2019-12-21 09:11:02
问题 In Xcode and Instruments I see UILabel (CALayer) using large amounts of virtual memory (Anonymous VM). I see about 235 KB of virtual memory per UILabel . I think this perhaps is a new issue with iOS 7.1 or 7.1.1. Is this expected? I created a simple program that creates 500 UILabels and Instruments shows 115MB of memory used. At about 1500 labels the application is terminated by the OS. for (int i = 0; i < 500; i++) { index = (int)[self.items count]; index++; frame = CGRectMake(10.0, 20, 300

Instruments crashing while using Leaks instrument

拜拜、爱过 提交于 2019-12-21 05:28:07
问题 Ok, so heres the issue. I'm attempting to debug an app with instruments but every time i try to use the Leaks instrument Instruments crashes about 3 seconds into it. This only occurs when i try to use it with an actual device, it will run fine when its just attached to the simulator. I have reinstalled Xcode and Instruments on 2 different computers, and am running the latest version. This isn't an issue with the app either because i have tried it with 2 other apps and the same thing happens.

Xcode Instruments stops recording when iPad app leaves the splash screen

混江龙づ霸主 提交于 2019-12-21 04:32:09
问题 I am writing an iPad app and I would like to use Xcode Instruments to see if my app has any memory leaks. I have used Instruments successfully before but with Xcode 4.0.2 recently with this app I have the problem described in the title. It only works very rarely. Steps to use Instruments: - From the Xcode menu: Product>Profile - Choose the Leaks instument - Watch Instruments start recording allocations and leaks while the app shows its splash screen. - The app's initial view controller

How can I get rid of resident dirty memory in Objective-C?

蹲街弑〆低调 提交于 2019-12-20 08:41:27
问题 I watched Apple's WWDC 2010 video on Advanced Memory Analysis with Instruments and from that, I was able to find a lot of resident dirty memory. I realize that having so much resident dirty memory is a bad thing (and probably the explanation for my app crashing so much...), but I'm not sure how to fix it. Where should I look? Instruments shows me a lot of potentially useful information that looks like gibberish to me, such as: % of Res Type Resident Size 18% VM_ALLOCATE (8192 pages) 32.00 MB

iOS/UI Automation: UIAActionSheet does not have possibilities to manipulate with buttons

十年热恋 提交于 2019-12-20 03:25:06
问题 My question is related to UI Automation template from XCode's Instruments tool. How does UI Automation support UIActionSheet testing? I know that there is a UIAActionSheet element and I was able to obtain it in my application. But I do not know how to get and manipulate with buttons from the action sheet. UI Automation does not provide any elements for these buttons. The UI Automation documentation does not have any info on the matter either. See the link below. It looks like this control

How to clear abandoned memory that doesn't point to own code?

ぃ、小莉子 提交于 2019-12-20 03:05:11
问题 It seems that my app is abandoning memory since the persistent memory of recorded heapshots don't fall to zero and the heap continue to grow when the same set of operations are continuously repeated: To find out the problems, many people suggest Bill's site that is not useful for me since I am using ARC, whereas he points to reference issues. I then followed Apple docs and watched some videos relating to abandoned memory from the WWDCs. They all say that instruments will help to point to the

Xcode Instruments 8.3 Display Settings button missing

可紊 提交于 2019-12-19 17:40:20
问题 In the latest version of Instruments 8.3 the display settings button has been removed and replaced by the File->Record settings dialog. When using the allocation tools I now can no longer activate Automatic Snapshotting, because the option is gone from the right panel and the record options dialog is only showing the value for the allocation tool but not for the vm tracker. Record options dialog Does anybody know where the option has been moved to? Many thanks 回答1: Many of the display