Synthesized properties for IBOutlets

I made a huge mistake in my synthesized properties for IBOutlets that resulted in a memory leak and many, many wasted hours. So, here’s what I was doing,

@property(readonly, unsafe_unretained) IBOutletIKImageBrowserView* photoBrowser;

I’m targeting 10.6, so I can’t use a weak property, but have to use an unsafe_unretained — but either way, you would think that this wouldn’t cause the image browser to leak, right? Nope. Here’s what you need,

@property(readwrite, unsafe_unretained) IBOutletIKImageBrowserView* photoBrowser;

Ah, that’s right — the property needs to be read-write, not read-only. Given that the pointer is unretained, I can’t imagine what’s causing this.