Originally Posted by Tango Issac Debian
Sometime during testing I faced a very strange problem. That I seen the pointer addresses were holding the previus running time values, until I restarted the system. Any solution for that?
Difficult to say without seeing some code (as in a minimal reproducing testcase). If pointers have the wrong values then probably you have a memory corruption somewhere. Specific pointer values are not predictable (except in very limited circumstances) so if everything is working fine then you shouldn't place any significance on any particular values.
For example in your original code you had:
ph->ap = (void**)malloc...
Now if this doesn't crash then it will modify the memory at &(ph->ap) which could belong to absolutely anything else in your program, there's no predicting what.
So a useful trick with pointers is to initialise them to NULL, then when they aren't needed any more and you delete the object they were pointing to, set them immediately back to NULL, and this way if you do use a dangling pointer then you'll get an immediate crash instead of some random memory address being corrupted.