Why is using self
allowed in static context in Objective-C?
I thought it was allowed and then I encountered memory errors that took me a week to find out that self
is not an alias for calling other static methods from the class instead of typing the class name.
Xcode and its compiler seems very smart at finding common pitfalls, why isn't it even generating a warning about something like that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…