How do you test for memory leaks on the new XCode 4.2? - iphone

I just got the new xcode and the tool I used to test for leaks isn't there under run anymore? Can someone tell me how to test for leaks?

Instead of having direct instruments in the menu, you start the app using the "profile" option and it asks you which instrument you want to use - there are the instruments you used to see, including Object Alloc and Leaks. There's also a very useful Zombie tool to help with over-released objects.

Related

"Leaks Discovered" but not shown in detail via Instruments

I am attempting to obtain information on possible leaks that exist in the iPad app I am currently developing. Typically when Instruments finds a leak, a red 'peak' appears on the graph within the leaks section and I am able to obtain information on that leak within my code. Currently, Instruments is instead telling me "Leaks Discovered", but there are no peaks on the leaks graph and no details are shown. Any idea on why that might be?
Not sure unless there's more information but I generally use "Build and Analyze" and fix all the leaks it shows there and only then move on to Instruments. Try Build and Analyze to see if it shows any leaks there. If you're using Xcode 4, its just Analyze under Product.

Memory Leaks tutorial in iphone

is there is any good tutorial link that can help me in the memory leaks of iphone,, b/c I am facing some problem whenever I allocate a memeory , in the dealloc I am releasing that memeory, but the problem is that when I run application in the (Run-> Run With Performance Tools -> Leaks) but I got the leaks through there.. how can I resolve it...
reply me plz
In XCode, you can run Build and Analyze. XCode shows memory leaks with arrows of you bad memory management.
This is a good tutorial : iphone-memory-management-tips

iphone app crashes?

i am running my program using iphone simulator n at some point application crashes..but there is no error...just getting Debugging terminated in debugger console
how i can check this what is the problem of crashes?
How about memory leaks?? If you are alloc-ing a lot of variables and not releasing them this can cause memory leaks. Which will in time cause the app to crash with a black screen. Try running your app with the "Leaks" tool. Go to Run -> Run with Performance Tools -> Leaks. Go through everything you can in the app with this tool running and it will inform you of any memory leaks.
Here is a good link for information about using the Leaks Instrument:
http://mobileorchard.com/find-iphone-memory-leaks-a-leaks-tool-tutorial/
Also check your code!! If you know where its crashing go and check the code and make sure your doing everything you intend to!
Try to look into crash logs. You can find them in ~/Library/Logs/CrashReporter

iPhone: iPhone application testing

First, Thanks to all for your quick help for any questions asked in this forum.
I just want to know what are the testing tools coming up with Xcode on Mac as i need to test my iPhone application professionally (or) What do you suggest to use debug and test my application using any (or) built-in tools?
Thanks.
The first thing I try is Xcode's "Build and Analyze" menu command.
Next thing is to run Instruments and look for memory and object allocations and disposal. Instruments should keep you busy for quite a while as it can provide you a wealth of information, including network performance and graphics utilization.
When using instruments, the first method you should check is memory allocation and leaks. When your application leaks, it will spike. Click on this leak and then extend the details to find the exact whereabouts of the leak.
However read the documentation on it all first.
Documentation

Using the leak program with the iphone device

I am trying to run the memory leak program in conjunction with my iphone device. The program says that there are leaks however it doesn't give me details.
GeneralBlock-32 No stack trace available.
How can I set up the leak program so it actually works with my iphone to give detailed information like it does in the simulator.
If you are running in Release mode, the compiler will not generate any debug symbols to map the calls back to your code.
if this is the case, changing your build type to Debug mode will provide you with more information about the leaking area of your application.
I have also noticed that the Frameworks tend to have memory leaks of their own, so it could be a leak from the framework.