@Paul
I have based on your previous template and your guide and wrote a program, which apparently is running ok. However, in order to avoid inherent defects, I would like to clarify two more points:
1. I don't know how to set a point to NULL, just use the release along. Seems the program is...