Illuyankas
Illuyankas

Reputation: 150

Memory increase with no release memory

I search how find my problem. In my application for iPad when i treat data i have an increase memory and never release that memory, i try instruments leaks memory but that not find memory leaks (i try with profile and analyze).

So my question is they have an other instrument for find memory leaks or other methods?

Thanks in advance for your consideration.

P.S : I don't post code cause that concerned a big part of my code but the part where memory increase is a part where i download from a FTP some zip files (based on SimpleFTPSample from Apple Doc) i unzip this files (with framework minizip) this zip files contains some images and XML files i parse this XML files (around 7200 XML files and 35 000 images files saved) i saved some information (issue of parsing) in data base and that its. If you need part of my code for help me ask me.

Upvotes: 1

Views: 206

Answers (2)

fishinear
fishinear

Reputation: 6336

This usually happens when you keep the objects in a datastructure (NSDictionary, NSArray, eg), even after you don't need them anymore. Check with Instruments' Allocations which objects are accumulated, and check in your code where you keep instances of those objects.

Another cause could be long-running threads. If the loading and parsing you mentioned are done in a single thread that takes a long time, then you may need to do @autoreleasepool in a loop somewhere to force temporary objects to be cleaned up regularly.

It might also be no problem at all. You say you load a lot of images. Images are by default cached by iOS, and only released when necessary to clean up memory. If Instruments "Trace Highlights" shows a lot of memory usage, but "Allocations" doesn't, then this is likely the cause.

Upvotes: 0

ahwulf
ahwulf

Reputation: 2584

Make sure if you have Zombies turned off in Scheme:Diagnostics. With Zombies on no memory is ever deleted. Testing for memory leakage should always be done with Zombies off.

Upvotes: 1

Related Questions