0

I'm trying to find all memory abandoned using instruments.

The leaks test has been passed and at least it can't find any memory leak.

I'm doing some repeated actions between each Marked Heap, and the average is 100,00 kb for heap growth and 1000 objects alive.

Doing a quick search on each snapshot, I found 700 with a heap of 64 kbytes.

The other are some objects used by internals iOS, like:

UIDeviceWhiteColor => responsible caller +[UIColor allocWithZone:] and I can find only the Malloc, but not the release.

I'm using the whiteColor like this:

scoreLabel.textColor = [UIColor whiteColor];

so, all this objects, are really going down ?

this is a complex example to debug/analyze as it navigates through 9 UIViewControllers, and each round takes aprox. 2 minutes to complete (the user must enter some data ...)

In other easier parts of this project, the heap realy has 0 bytes and 0 objects, but it's a simple one.

thanks for your advice,

regards,

m.

mongeta
  • 2,301
  • 2
  • 32
  • 42

1 Answers1

-1

Some things will be cached, and therefore not released. You could try triggering a memory warning.

I wouldn't worry too much about small leaks.

tc.
  • 33,468
  • 5
  • 78
  • 96
  • What is the way to trigger a memory warning with Instruments ? – SkyEagle888 Dec 21 '11 at 00:17
  • On the simulator, **Hardware** → **Simulate Memory Warning**. On device, just do something like `[[UIApplication sharedApplication] performSelector:@selector(_performMemoryWarning)] withObject:nil]` (private API, so don't ship this to the app store!). See http://stackoverflow.com/questions/2784892/simulate-memory-warnings-from-the-code-possible – tc. Dec 21 '11 at 14:18