Namaste! How often do you, experienced guys using generic pointers in daily routine and what’s the common purpose for generic pointers in cocoa-touch development?
EDIT
A variable declared as a pointer to void is a generic pointer.
There’s such thing. It may be set to an address of any variable type. I just want to know how the people use this kind of pointers in real life coding.
P.S Thank you for down voting.
There are fewer and fewer cases where
void*is appropriate in ObjC. They’re still used for some things like context pointers for KVO, but with the addition of ARC they’re a pain to use even for that. Basically, if you need to ask when you would use avoid*, you probably shouldn’t use avoid*. They’re a little more common in the callbacks of Core frameworks, again usually for context pointers.But to the question, “How often do you… [use
void*] … in daily routine,” the answer is “very seldom, and as little as possible.”