dontWatchMyProfile
dontWatchMyProfile

Reputation: 46370

What does it mean if Live Bytes becomes bigger over time while the Leaks instrument discovers no memory leaks?

My app starts with about 3 MB Live Bytes, and after 10 minutes of use it reaches 6 MB and also gets some Low Memory Warnings. But there are no Memory Leaks discovered by the Leaks instrument.

What can be the cause for this?

Upvotes: 1

Views: 207

Answers (3)

zaph
zaph

Reputation: 112865

As @viggio24 says, there may well be an "abandoned memory" problem such as cashes that are not released retain cycles, etc.

Try Heapshot Analysis, bbum has a great tutorial here.

Basically you take a Heapshot, run some procedure, take another Heapshot for several iterations. This will help find memory that lost but not a leak. I use this method often,

I have used Heapshot many times to great advantage, many thanks to bum.

Upvotes: 2

viggio24
viggio24

Reputation: 12366

This is a typical case of "abandoned memory". Not a leak in the strict sense of the definition, but almost. This means that you have retained some objects, you have not lost the references to them (so they are not leaked and analyzer and instruments don't trigger them) but you simply forgot to release them. This is typical when you do some sort of internal caching (e.g.: images) and then you don't clean this cache of data which is no more needed.

Upvotes: 1

Dancreek
Dancreek

Reputation: 9544

You are just using a lot of memory. A leak occurs when you load something into memory and then stop referencing it before you have released it. In your case it sounds like you are loading items into memory that you still have active references to so they don't show up as leaks.

Upvotes: 1

Related Questions