NSPersistentDocument and canConcurrentlyReadDocumentsOfType
NSPersistentDocument and canConcurrentlyReadDocumentsOfType
- Subject: NSPersistentDocument and canConcurrentlyReadDocumentsOfType
- From: Michael Link <email@hidden>
- Date: Tue, 12 Oct 2010 15:14:18 -0500
In the documentation for NSPersistentDocument's method -managedObjectModel it says the following addition in a subclass can be used to improve efficiency if all the documents share the same model.
> - (id)managedObjectModel {
> static id sharedModel = nil;
> if (sharedModel == nil) {
> sharedModel = [[super managedObjectModel] retain];
> }
> return sharedModel;
> }
If the app is running on 10.6 and returns YES for canConcurrentlyReadDocumentsOfType I'm assuming some sort of synchronization would be necessary here?
--
Michael_______________________________________________
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