bodacious
bodacious

Reputation: 6705

Am I doing something wrong with Instruments in Xcode 4.3.2?

I followed this video tutorial for detecting memory leaks using Instruments with Xcode 4.3.2.

As you can see from the video, the creator gets a lot of useful feedback on the type of object that was leaked etc.

How Instruments should look

When I run instruments, I detect a few memory leaks but don't get much useful feedback on them:

My Instruments View

What does it mean "Root Leaks"? Why is there no more useful information like in the screen above?

Is this something I can fix?

I'm using ARC within my app - does that effect Instruments finding memory leaks in any way?

Upvotes: 0

Views: 2726

Answers (1)

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

A root leak can be one of two things. It can be a single memory leak, or it can be the start of a leak cycle. A leak cycle occurs when you lose a reference to a group of objects. A memory leak leaks one object while a leak cycle leaks a group of objects.

Your code may not have any leak cycles, which would explain why your Cycles and Roots section shows less information than the tutorial. Choosing Call Tree instead of Cycles and Roots from the jump bar can help you find the areas of your code that are leaking memory.

Upvotes: 3

Related Questions