Is it possible to get a list of pointer to a pointers to an objective c object.
something like
id **pointers(id object, int *out_count)
Pretty crazy, huh? =)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately, no. If such a thing were generally possible, then writing a precise garbage collector would be rather simple:
Since the objective-c garbage collector has to chase pointers from roots, control the allocator, and scan the stack conservatively to achieve something like this, I think it’s reasonable to assume that you’d need to do the same.
It might be possible to leverage the garbage collector’s implementation of this, though, if running in GC mode. Not a good idea, not simple, and won’t work on iOS, but maybe possible. libauto is open source after all.