The Proper Way To Deallocate A Pointer
May 9, 2012 Ted Holt
Jerry Clower used to tell a story about attending a rattlesnake roundup. He said that people from the humane society were on hand to be sure that the rattlesnakes were killed properly. Mr. Clower remarked that he didn’t know that there was an improper way to kill a rattlesnake. Pointers can be like rattlesnakes, biting you when you don’t expect it. Do you know the proper way to kill a pointer? Use the %ALLOC function to allocate memory to a program. The system copies the address of the memory into a pointer variable. D SomePointer s D SomeData s 256a |