Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 16, 2008, 09:54 AM   #1
Duke Leto
macrumors regular
 
Join Date: Mar 2008
How to FInd Where memory leaks are

In anther thread, it seems that people know which lines of code leak. How is it possible to determine where exactly the leak is. I am using Instruments, but it only tells me that I am leaking an Array somewhere.
__________________
Gravita - a gravity simulation.
Available for Mac at http://www.thebluekoala.com
Duke Leto is offline   0 Reply With Quote
Old Jul 16, 2008, 10:29 AM   #2
louden
macrumors 6502a
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
Debug memory leaks (one way) is to run your app using "Run/Start with Performance Tool/Object Allocations"

If you see allocations go up but not come back down .... You may have a leak...
__________________

8 Core 2.8 GHz Mac Pro
Core i7 11" MBA Ultimate
louden is offline   0 Reply With Quote
Old Jul 16, 2008, 03:06 PM   #3
SwampThingTom
macrumors member
 
Join Date: Jul 2008
Location: Fairfax, VA
Quote:
Originally Posted by Duke Leto View Post
In anther thread, it seems that people know which lines of code leak. How is it possible to determine where exactly the leak is. I am using Instruments, but it only tells me that I am leaking an Array somewhere.
In Instruments, hover the mouse over the Array (or whatever object) that is leaking. You'll see a ">" icon appear next to it. Click on that to drill down. Eventually it will lead you to the exact line in your code that is leaking.

It's *very* useful!

Tom
SwampThingTom is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
TUTORIAL: How to get PCSX2 to run on Mac(without Bootcamp) Mirrors Mac Applications and Mac App Store 21 Mar 14, 2013 03:34 PM
How to convinc my parents to let me buy a 17" MacBook pro Ulf1103 Buying Tips and Advice 55 Feb 20, 2012 08:11 AM
How to Find the Memory Bus Speed? TheZTwin MacBook Pro 8 Aug 5, 2011 12:41 PM
[HOW TO] DIY iPhone 4 Swivel Car Mount QuarterSwede iPhone Accessories 13 Mar 8, 2011 02:51 PM
Help me to find this memory leak atmc iPhone/iPad Programming 4 Mar 6, 2011 01:48 PM


All times are GMT -5. The time now is 04:23 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC