I know that this thing has been answered a lot of times and I have also read the documentation as well but still I am not able to clearly understand how is this working. As
Make sure that you plug the memory leak that the above approach entrails. I am guessing in the above x is a pointer of type void *. Check this out.
x
void *