Thursday, January 15, 2009

Don't write .DS_Store files on remote machines

To configure a Mac OS X user account so that .DS_Store files are not created when interacting with a remote file server using the Finder:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true


(Got from here)

Wednesday, January 14, 2009

Breakpoints to put in .gdbinit

Here is a list of break points to put in ~/.gdbinit that are really helpful in debugging memory problems:

fb -[NSException raise]
fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]

#define NSZombies
# this will give you help messages. Set to NO to turn them off.
set env MallocHelp=YES
# might also be set in launch arguments.
set env NSZombieEnabled=YES
set env NSDeallocateZombies=NO
set env MallocCheckHeapEach=100000
set env MallocCheckHeapStart=100000
set env MallocScribble=YES
set env MallocGuardEdges=YES
set env MallocCheckHeapAbort=1

set env CFZombie 5

fb -[_NSZombie init]
fb -[_NSZombie retainCount]
fb -[_NSZombie retain]
fb -[_NSZombie release]
fb -[_NSZombie autorelease]
fb -[_NSZombie methodSignatureForSelector:]
fb -[_NSZombie respondsToSelector:]
fb -[_NSZombie forwardInvocation:]
fb -[_NSZombie class]
fb -[_NSZombie dealloc]

fb szone_error


(Got from www.cocoadev.com )