I stumbled upon the answer myself.
I had created a UIButton with this code:
Code:
UIButton *b = [UIButton buttonWithType:UIButtonTypeRoundedRect];
....;
....;
[b release]
What works is the following:
Code:
UIButton *b = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
....;
....;
[b release]
I'm not sure I understand why it needs to be like that, but there you go. :-)