On Dec 7, 2011, at 3:10 AM, Bernie wrote: > >> However, something like this would be bad: >> local fn CopyMyString( string as CFStringRef ) as CFStringRef >> end fn = fn CFStringCreateCopy( _kCFAllocatorDefault, string ) >> fn CopyMyString( @"alpha" ) > > Really bad: > local fn GetMyString( string as CFStringRef ) as CFStringRef > end fn = fn CFStringCreateCopy( _kCFAllocatorDefault, string ) > fn GetMyString( @"alpha" ) > > bw > Bad = memory leaks in these cases shown by Bernie. There is no way to release the CFStringRef if the returned ref is ignored. Brian S