A pointer that does not store any memory address is called a null pointer (a null pointer)
The wild pointer is a pointer to "junk" memory (memory not available). The wild hands are very dangerous.
For example, a class that defines a person, the person class has a-(void) SetName method
Person * per = [[Person alloc]init];
[Per SetName]; The meaning of this sentence is to send a setname message to the person object to which per is directed
[per release]; This code means sending a release message to the person object that the person is pointing to, and the person object will be destroyed when it receives the release message and the memory will be recycled
[per SetName]; This code will have a wild pointer error, the person object has been destroyed, the memory occupied by the person is already garbage memory, if you have access to this memory, it will report the wild pointer error. This memory is no longer available, it is not yours, and you have to visit it, it is certainly not legal.
per = nil; The code is to empty the per pointer and become a NULL pointer
[per SetName]; At this point the code is not error-free, but it cannot be executed because per is a null pointer. So the SetName method is not to be called.
IOS wild pointer and null pointer