Questions tagged [instruments]

Instruments usually refers to the performance analysis developer tool provided by Apple for Mac and iOS development.

While the term may have other applications (such as in musical instruments), it is usually used on this site to refer to the Instruments performance analysis tool provided by Apple alongside their Xcode IDE. It contains a suite of performance tests, as well as some debugging-related functionality, wrapped in a GUI environment geared toward data analysis.

Instruments is a performance-analysis and testing tool for dynamically tracing and profiling OS X and iOS code. It is a flexible and powerful tool that lets you track a process, collect data, and examine the collected data. In this way, Instruments helps you understand the behavior of both user apps and the operating system.

Links

1820 questions
0
votes
0 answers

memory leaks in iOS (objective C)

I am having a hard time trying to understand memory leaks in my project. Some of them are simple statements as: -(void)configureNotificationTypesFor:(NSDictionary *)notificationDict { NSArray *keys = [notificationDict allKeys]; // leaks 1 byte…
Tejas K
  • 682
  • 11
  • 28
0
votes
0 answers

Trace every object's load and store in java

Is there some way to trace every object's load and store operation in JAVA? After this I also want to insert some self-defined function between the given JAVA code without manual modification. So is there some easy way to achieve these? Thanks a…
Aries_Liu
  • 95
  • 1
  • 10
0
votes
3 answers

Where is the leak?

The Instruments tells me that this piece of code has a leak. However, I am pretty sure I have released it later on. Can anyone tell me what's going on here? - (void) addReminderEntry{ DataEntryController* item = [[DataEntryController alloc]…
Winston Chen
  • 6,799
  • 12
  • 52
  • 81
0
votes
1 answer

iOS ARC UIAlertView leaking memory

I have simple method showing AlertView with textfield. Instruments showing memory leak in this. Please explain. - (void)method { NSString *value = [[NSUserDefaults standardUserDefaults] valueForKey:@"key"]; if (value == nil) { UIAlertView…
PK86
  • 1,218
  • 2
  • 14
  • 25
0
votes
2 answers

Memory Leak for decodeObjectForKey in Custom Object

I've run into a leak when trying to load saved custom objects from NSUserDefaults. Here is the code that's the culprit. Does anyone see anything that's clearly wrong? @interface CustomQuery : NSObject { NSString *theTitle; NSString…
aahrens
  • 5,522
  • 7
  • 39
  • 63
0
votes
1 answer

Instrument for count the number of method calls on iPhone

The Time Profiler can measure the amount of time spent on certain methods. Is there a similar method that measures the number of times a method is called?
Paul Alexander
  • 31,970
  • 14
  • 96
  • 151
0
votes
2 answers

Objective-C: Memory leak with CGDataProviderCopyData

With the help of the instrument, it is shown that CGDataProviderCopyData is using too much memory. How to fix the issue? -(UIImage*)imageNamed:(NSString*)name { UIImage *uiimage = [UIImage imageNamed:name]; CGImageRef originalImage = [uiimage…
0
votes
2 answers

URL memory leak

Instruments shows that these lines of code cause memory leaks, what am I doing wrong? required init(data: JSON) { self.type = data["type"].stringValue self.name = data["name"].stringValue self.numberOfRestaraunts =…
JuicyFruit
  • 2,638
  • 2
  • 18
  • 35
0
votes
0 answers

Profiling Qt programs in macOS (Mac OS X) using Instruments

I am using TimeProfiler form Instruments to profile my Qt applications. Profiling works good, but the problem is that in the call tree contains a lot of Qt functions that sometimes isn't very useful. For example a have a function…
Kamil Zaripov
  • 904
  • 11
  • 33
0
votes
1 answer

glClear causing problems according to Instruments? (OpenGL ES on iPhone)

I've been noticing lately that my game sometimes has performance issues, where each frame takes a lot longer than it should to finish. I plugged it into the CPU Sampler in Instruments and found something pretty strange (I think, this is my first…
Parker
  • 59
  • 1
  • 8
0
votes
2 answers

Frameworks cause memory leak in macOS

I have a project with an empty main() function. Just by linking frameworks to my project (e.g. ImageIO.framework) Instruments lists un-freed memory allocations after shutdown of my application. 1) Can I hide persistent memory allocations in…
HelloWorld
  • 2,392
  • 3
  • 31
  • 68
0
votes
1 answer

Find Memory app is using in instrument?

I'm debugging my App through instruments. To figure out the memory, my app, is using through Activity Monitor Instrument. Which one is the real memory my App is using? -All heap & Anonymous VM or All heap Allocations
user6398734
0
votes
1 answer

Can your iOS app be killed by the OS for high energy impact?

I've got a difficult to fix bug. It's an exception bad access, that won't throw an all exception breakpoint. No stack trace is given. Turning zombies on isn't trigger any zombies, etc. While memory usage is insignificant I notice that Energy Impact…
chris P
  • 6,359
  • 11
  • 40
  • 84
0
votes
1 answer

Simple use of Leaks Instrument on a console application

I would like a simple example on how to use the Leaks tool. see: #include int main (int argc, char * const argv[]) { char *buf = new char[100]; sprintf(buf, "Hello, World!\n"); // insert code here... std::cout << buf; return…
Jonathan
  • 4,724
  • 7
  • 45
  • 65
0
votes
2 answers

Leaking NSAutoreleasePool

I'm working on an app and have 1 leak left. The leaked object is NSAutoreleasePool, size is 32 bytes. In the stacktrace only foundation methods are called. I have no clue how to resolve this. In simulator no leaks reported, on the device only this…
McDJ
  • 767
  • 2
  • 11
  • 28