Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
I decided to download the iPhone sdk beta 3.0 and do stuff with it. So, I am using Core Data, or at least I am trying to. The problem is that I made an application with the best of considerations as far as memory management is concerned, only to find that it is leaking from a point that I can't understand!

The leaked objects are instances of NSConcreteMutableData and GeneralBlock. I don't have the slightest idea what those classes do, but since I have as an example one of Apple's sample projects, named CoreDataBooks, I decided to run Apple's sample project and see what happens using the Instruments tool.

And I noticed that even Apple's sample code is leaking with the same objects! This happens most of the times when I click the disclosure buttons on the table view, and when I delete an object. It also happens some other random times.

So, is it me, or apple? I wish I could provide you with Apple's sample code, but I don't think I should do that. But it is provided as an example of Core Data usage in the Documentation at Apple.

Any recommendations or info? I would really like to know what may cause this problem, especially on Apple's sample code, and what are those strange classes whose objects are leaking...
 
I’m unsure about NSConcreteMutableData, but I wouldn’t worry about GeneralBlock leaks. I’m pretty sure they’re Apple’s fault and nothing you can prevent; I believe they come from the table view, but I’m not absolutely positive.

Are you getting the same number of NSConcreteMutableData leaks as how many cells you have in your table view? Are there any correlations you can make?
 
this is kinda off, but for an application that requires a read-only database, would using Coredata improve performance? or i can go through the old route?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.