Get rid of the semicolon after
- (void) dealloc
in your .m file.
You only need the semicolon after that dealloc method declaration in your .h file.
Question
I am getting a "expected identifier or'(' message in Xcode. This comes after (void)dealloc; I am not sure how to fix this or why it is coming up. If someone could tell me how to fix this, I would appreciate it. I am basic at this, so I would appreciate a step by step solution. Thanks a lot! My code:
- (void)dealloc;
{
[testView release];
[lblMsg release];
[super dealloc];
[scroll release];
[pager release];
[viewControllers release];
[super dealloc];
}
Update: Thank you all for your outstanding help. I have resolved the issue by using a completely different method to reach my goal.
Solution
Get rid of the semicolon after
- (void) dealloc
in your .m file.
You only need the semicolon after that dealloc method declaration in your .h file.
OTHER TIPS
Noticed that you have [super ...] twice. Most of the effective sample code I have seen puts (leaves) this first and only once. You can use // before a line or multiple lines to see if the error goes away and if it will run without that (possibly unnecessary) code. I have found that the [... release] lines are sometimes allowed and often not allowed as stated earlier. Again, // is for commenting out a line of code, but can also be "restored" by simply deleting the //.