Re: leaking memory in Core Data
Re: leaking memory in Core Data
- Subject: Re: leaking memory in Core Data
- From: "John R. Timmer" <email@hidden>
- Date: Mon, 12 Nov 2007 08:17:58 -0500
Thanks for checking. I did follow the threading guidelines - there's
a separate PersistentStoreCoordinator and MOC for the thread, both of
which are released when it's done. If i comment out the code that
populates a relationship, there are no leaks, so i'm pretty sure it's
specific to that.
I'll file a bug now and, once i get the import implemented as a
separate process, see if i can distill things down to a simple case.
If you think de-threading the code and rechecking for leaks would be
informative, I'm willing to give that a try. I could also send you
the full code of the threaded message off list, if you think it would
be helpful.
Cheers,
John
On Nov 11, 2007, at 8:53 PM, Ben Trumbull wrote:
I am, however, still seeing a very low rate of memory leaks.
These are very rare (i found
6 after processing 10K of records), but I'm doing a massive
import, and they add up.
Hmm. I've looked at the stack trace and the control flow here, and
don't see any obvious leaks. I haven't seen anything like this from
our unit tests (running heap on nightly builds == yummy goodness).
That and the fact it only happens 6 / 10,000 times suggests
something very odd, possibly threading related, is going on.
Double check you're following the multi-threading guidelines in <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdMultiThreading.html
>
File a bug report with bugreport.apple.com and we'll take a more
extended look. If you attach a sample project with source that
reproduces your problem, it would really expedite things.
- Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden