how to detect memory leak in new sdk 3.2? - iphone

I have implemented ipad application foe that i want to check memory leak.I know that there is some extra feature for memory leak.but i dont know how to enable.please advice me if possible.

To check for memory leak you can run your app with the Leaks tool. To do so, go to Run > Run with Performance Tool > Leaks.
In order to get precise information about leaks, activate "Extended detail" by pressing CMD-E, and click on a leaked block.

Related

Analyzer Results vs Leaks by Instruments : iPhone memory leaks

I fixed memory leaks of my application using
X-Code->run with performance tool -> leaks
I submitted my application and later I analyzed my code attaching to device like Build & Analyze for device i got many Potential Leaks popped up when i pressed Product then cmnd+shft+B.
What is the difference between the two, was my fixing of leaks based on instruments wrong?
Is it like some leaks pointed by analyzer may actually cause leaks which are not shown/caught by Performance tool?
When you run the leaks performance tool it will let you know WHEN a leak actually happened. Build & Analyze warns you of potential leaks that COULD happen while your program is running.
Your fixing leaks based on instruments was not wrong, but you should also carefully look into the leaks build & analyze tells you, as they could potentially leak when the program is actually running.

Query about memory management in iPhone

I have query regarding memory management for iPhone app.
I have a app in which is also build in for android app as well.
Now we have same functinality and same variables but due to some bad memory management the app gets crashed for iPhone (after 20 - 25 min) and on Android it works perfectly for much longer time without crashing.
In android they have garbage collector but for iPhone sdk we dont have anything like that, so I'm a bit confuse how to proceed.
I have released all the memory allocations in didReceiveMemoryWarning and also in dealloc.
Fisrt you have to find the memory leak. so run the app in debug mode or using instrument first find the problem and update here. and important thing if you get EXC_Bad_Acc means you have to enabled NSZombieEnabled for further detail give me a comment
Before you do what #maheswaran suggests, run the analyzer to determine if you have any easy to find (for the analyzer) memory problems.
Also, it would be good for you to put some time aside and read about how memory management works on iOS.

Memory Allocation in iphone

I am checking memory allocation in performance tool, i am getting more than 90 MB memory allocation while running an app for 30-40 mins.Can anyone tell me at which extent memory allocation can go or there is some specification of APPLE for memory allocation or what is criteria to upload it on an appstore or what .
Please hme next week app is going to upload on an appstore
Manjot Singh
Use Instruments to find memory leaks: in Xcode, chose the menu Run -> Run with Perfomance Tool -> Leaks. See for example this article or this article on how to find and fix memory leaks with Instruments.
I pretty sure that your app has tons of leaks, if you are saying that memory usage grows during time. This could be the reason why appstore can reject your app, so you'd better fix that.

How to improve memory footprint for iPad apps

I have an iPad app that is doing really well, zero crashed reported by Apple after 5 months and 3 releases.
However occasionally the OS kills the app, my guess is for shortage of free memory.
I am not doing anything right now in the warninglowmem event.
I would like to receive some solid recommendation of what I should do to improve the memory footprint. What tools and tricks I can start using to understand where I am right now and how further I can go with the improvements.
I'd suggest starting by reading about Instruments which will let you see what memory you're using and how much. In particular, the "Quick Start" and "Analysis Techniques" sections in that document should get you pointed in the right direction.
Using the "Allocations" instrument will help you watch your memory grow and tells you where it's being allocated.
You might also try using the "Leaks" instrument, which will point out if you're leaking memory (rather than just allocating too much).
There is an awesome instrumentation tool included with Xcode that lets you look for leaks. From the Run menu choose Run With Performance Tool -> Leaks and you can see where you might be leaking memory over time. That's a great place to start. Next you can look at the "Allocations" tool to see how you're utilizing memory over time. Start there and you'll learn a ton.

How to use Zombie while debugging iPhone application?

How to use Zombie while debugging iPhone application?
It's about setting up an environment variable. See the following article for details
http://www.cocoadev.com/index.pl?NSZombieEnabled
Take good care of not letting this in place because no memory will ever be free.
You can open up Instruments and choose the Zombie instrument and next your app target from the 'Choose Target' drop down menu. And use your app till it crashes this will lead you to the Zombie object that causes it to crash.
Remind not to use the Leak instrument with the Zombie one since it will show many leaks (the objects not deallocated kept in memory to test if they can be zombies in the futures) and remember it will use lots of memory so you'd better you the simulator for this task.