Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Many-To-Many Relationship Interface in Core Data




On Apr 26, 2007, at 5:09 PM, Frank D. Engel, Jr. wrote:

malloc: *** Deallocation of a pointer not malloced: 0xbfffd8a0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
But I don't do any retain (should I? I am setting these as member variables of the class, and using them in the other methods later on), release, malloc, free, etc...


For a summary of memory management rules, see <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html >;
the enclosing document gives a full treatment.



restrictions = [NSEntityDescription entityForName:@"Restriction" inManagedObjectContext:ctx];
qualifiers = [NSEntityDescription entityForName:@"Qualifier" inManagedObjectContext:ctx];
[...]

But I don't do any retain (should I? I am setting these as member variables of the class, and using them in the other methods later on), release, malloc, free, etc...


You should almost certainly be retaining these values, but "indirectly" using accessor methods -- see the references given above.


I'm sorry if any of this seems obvious, but I'm still learning Cocoa while trying to do this!

You are *strongly* discouraged from using Core Data (and even bindings) until you have mastered the fundamentals of Cocoa. These technologies give a high level of abstraction that makes problem- solving difficult or impossible if you do not understand the basics upon which they are built.

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Many-To-Many Relationship Interface in Core Data (From: "Frank D. Engel, Jr." <email@hidden>)
 >Re: Many-To-Many Relationship Interface in Core Data (From: mmalc crawford <email@hidden>)
 >Re: Many-To-Many Relationship Interface in Core Data (From: "Frank D. Engel, Jr." <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.