Thursday, August 11, 2011

Malloc Dealloc

Here is one thing that took me 1 hour to figure out:

If you have property retained object, do not assign a malloc value to it, so the first one below is wrong but the second is right:

self.object = [[OBJect alloc] init];

object = [[Object] alloc] init];

first example will retain the object twice so be careful.

Uninstalling Xcode

Here is a simple command to uninstall XCode from your system (Assuming it is in Developer directory):

sudo /Developer/Library/uninstall-devtools --mode=all