Re: NSTimer: Debug vs. Release build
Re: NSTimer: Debug vs. Release build
- Subject: Re: NSTimer: Debug vs. Release build
- From: Martin Wierschin <email@hidden>
- Date: Mon, 16 Mar 2009 17:34:23 -0700
btw, this method doesn't have any parameter, it's definition is:
Whether you need it or not, you must take it, because that's the
method
signature that NSTimer expects to call back.
I don't want to confuse the issue for Stefan, as matching up selector/
method names exactly is obviously very important. However, is there
actually any issue when a dynamic method dispatch includes arguments
not present in the actual method declaration/definition? Eg:
@interface XXObject
- (void) blissfulIgnorance ;
@end
@implementation XXObject
- (void) blissfulIgnorance
{
// do something
}
@end
{
XXObject* obj = [[[XXObject alloc] init] autorelease];
[obj performSelector:@selector(blissfulIgnorance) withObject:obj];
}
As far as I can see, the dispatcher would push the argument to the
stack (or wherever), and they would simply be ignored by the method,
no harm done. The only theoretical problem I can imagine is if the
method returned a value whose location in memory was dependent on the
placement of the method arguments- is that the case on some
architectures? Or is there some other problem?
~Martin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden