Added freeing of newed heap items to the pointers example.