Re: Garbage Collection and NSManagedObject

2009-02-13 Thread Samuel Strupp
You are right i forgot to remove the persistant store from the coordinator. But i am not sure if that is important because i set the context and coordinator refs to nil. managedObjectContext = nil; persistentStoreCoordinator = nil; managedObjectModel = nil; After this I thought the garbage

Garbage Collection and NSManagedObject

2009-02-12 Thread Samuel Strupp
Hi guys i have problem with the garbage collector. May App is a CoreData App (not document based). If i try to change the database and load a new one. The grabage collector collects the old NSMangedObjects from the old store. But this happens in the gabage collector thread. The

Re: Garbage Collection and NSManagedObject

2009-02-12 Thread I. Savant
On Thu, Feb 12, 2009 at 9:52 AM, Samuel Strupp str...@synium.de wrote: i have problem with the garbage collector. May App is a CoreData App (not document based). If i try to change the database and load a new one. It's not clear what you mean here. Be *very* specific (and show code). --

Re: Garbage Collection and NSManagedObject

2009-02-12 Thread Samuel Strupp
Hi I simply want to delete the actual database (SQL Database) and load a new one. First: all controllers which hold refs to NSManagedObjects will be deleted. Then the i call [[NSGarbageCollector defaultCollector] collectExhaustively]; Then i disconnect from the database. This is the

Re: Garbage Collection and NSManagedObject

2009-02-12 Thread I. Savant
On Thu, Feb 12, 2009 at 10:55 AM, Samuel Strupp str...@synium.de wrote: I simply want to delete the actual database (SQL Database) and load a new one. Okay. First: all controllers which hold refs to NSManagedObjects will be deleted. What do you mean deleted? Do you just mean you're

Re: Garbage Collection and NSManagedObject

2009-02-12 Thread I. Savant
On Thu, Feb 12, 2009 at 11:23 AM, I. Savant idiotsavant2...@gmail.com wrote: Are you *sure* that's the problem? It may not be. My first suspect is that I don't see anywhere that you're actually tearing down the right parts of the Core Data stack (the context and the persistent store). ...