boyfarrell.com Archives: April 2007
·
26 April 2007
Implementing Object Copy
Found a handy little reference today (click link below) about conforming to the NSCoding Protocol:
Apple Conceptual Cocoa Documentation
If you want your objects to be become part of NSDictionary classes then you will need to add the -copyWithZone: method in your class. If your objects only contain primative types such as double, int, BOOL [...]
continue reading... » 0 Comments
26 April 2007
malloc: *** Deallocation of a pointer not malloced: 0×500120; 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
I keep on getting this error all afternoon when a Cocoa application. It basically means ‘you are releasing something twice’. e.g.
WRONG!
… //lovely code …
[object release];
… //lovely code making you forget things …
[object release];
CORRECT!
… //lovely well behaved code …
[object release];
… //lovely well behaved code not at all requiring a garbage collector.
I don’t know about how to [...]

