Safe casting in Objective C -


What's the purpose-something like C ++ safe briefs?

I know that those objectives are in C ++, but I am not sure about possible side effects. The objective C ++ can slow down collection time - is there any other reason to use it?

Objective-c ++ is inserted securely, alternatively, we can use runtime reflections :

  id myOb = [someObject getObject]; NSAssert ([myOb isKindOfClass: [MyClass class]], @ @ MyClass is not like the return value type. "); MyClass * newOb = (MyClass *) myOb;  

Reference:

:


Comments

Popular posts from this blog

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

Best practice for URL redirection in ASP.NET web application -