Original Post
Can I do a function that takes a pointer to a pointer to a baseclass. I'm doing retaincounting in the baseclass and when calling a release method I check if the count reached zero and then deletes the object. However, sometimes double-releases sneaks into the code and everything crashes. This error can take hours to find. So what I'm trying to do is a function that takes a pointer to the pointer and will first release the object and then reset the pointer to NULL. This works only if I have a pointer to the baseclass, not of it's childrens. I get errors like this when compiling:
error: invalid conversion from "Vector3**" to "Object**"
error: initializing argument 1 of "void release(Object**)"
I thought that void** would solve this but the same error occures. Any ideas?