how can i use pointers with delete key word and the destructor?
<p>i was wondering how destructors can be made to work with pointers and delete.</p>

<p>i have a sprite pointer class i want it to call the destructor when the delete key word is used on it, however it is to my understanding this wont work as pointers don't leave memory until the end of a program.  </p>

<p>Any advice on making these work together? </p>