Instruments makes app quit when testing for leaks - MacRumors Forums
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 Jun 28, 2008, 08:38 PM   #1
Enuratique
macrumors 6502
 
Join Date: Apr 2008
Instruments makes app quit when testing for leaks

Hi all,

I was wondering if any one knew what would cause Instruments to just crap out while recording Leaks / Object Allocation? To give some context as to what my program is doing when it craps out:

I have a ViewController class that initializes a custom written data source class that implements the UITableViewDataSource protocol. I implemented the ViewController's awakeFromNib to allocate an instance of my custom data source class. The init method of the custom data source class is a sort of heavyweight operation in terms of memory - it parses a flat text file of words (around 40,000 words in my word list) and builds a tree for each word in the list for fast searching. There end up being around 100,000 nodes taking up roughly 38 MB of RAM after all is said and done.

It appears that the initialization phase completes succesfully before Instruments stops recording and my app appears to have quit on the iPhone Simulator. Fortunately, during that time it found no leaks. I've been pretty careful about how I use the memory. But there are operations past initialization I'd like to test for leaks - like searching the word list I've just parsed. Now, I've figured out that I can just attach Instruments to the iPhone debugger after initialization has occurred and go from there - again no leaks found

The weird part is, the first time I ever tried testing for leaks, this didn't happen - it got past the initialization phase and I was able to test my other operations for leaks as well but haven't gotten Instruments to behave since.

Anybody have any ideas what could be causing this? I'm pretty sure my code is solid at this point, so it's not a big deal, but is kind of annoying nonetheless.

Thanks!

Enuratique
__________________
24" Aluminum iMac, 2.8 GHz, 4 GB RAM, 500 GB HD, 8800 GS; Black 32GB iPhone 4; Black 30GB 5th Gen iPod
Enuratique 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

Similar Threads
thread Thread Starter Forum Replies Last Post
I want a "Force Quit" button in "Shutdown timed out because (app) didn't quit" dialog moonman239 OS X Mavericks (10.9) 0 Mar 9, 2014 11:37 PM
iPod Shuffle makes iTunes quit 808? iPod 1 Feb 21, 2013 11:02 PM
Anyone ever seen Phantom Memory Leaks in Instruments? wpostma@mac.com Mac Programming 0 Jan 10, 2013 01:58 PM
ip5 leaks are controlled apple leaks to find the holes and distract us DeuxIt iPhone 53 Jul 21, 2012 04:34 PM

Forum Jump

All times are GMT -5. The time now is 06:01 PM.

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC