I was working on a rather complicated NSTable subclass, and everything was going just fine, then all of a sudden the program just plain failed. I traced the failure to the autorelease of a table column data cell (an NSTextFieldCell subclass that my code had put there as part of the awaking process). I put in an -autorelease override that logged and found that the cell was getting autorelease messages whenever I clicked on it (while selecting the row), moved the mouse over it in the selected row, selected it for editing and whenever a character was typed into it. When it exited editing, the log would show that the autorelease pool had received a -validateEditing: message that it could not understand.
All this was supremely aggravating. I was able to get past it by setting -fobjc-gc (garbage collection supported) but I just cannot understand why it would be fine one minute, then a quick build and everything is messed up. I suppose I could blame the cat for walking on the keyboard while I was out of the room, but then I would expect some sort of build errors or warnings.
Has anyone seen this kind of thing?
All this was supremely aggravating. I was able to get past it by setting -fobjc-gc (garbage collection supported) but I just cannot understand why it would be fine one minute, then a quick build and everything is messed up. I suppose I could blame the cat for walking on the keyboard while I was out of the room, but then I would expect some sort of build errors or warnings.
Has anyone seen this kind of thing?