I haven't coded in a while, months. Anyway I'm back and I need a little refresher.
If I have 2 pointers:
and set ptr2 using new, and set ptr1 to point to ptr2, how do I delete ptr2 through ptr1? I was thinking delete *ptr1 or delete &ptr1; The latter works syntactically, but not sure if it's doing what I want. Is that correct? If not, what is? Thanks
Code:Type* ptr1; Type* ptr2; ptr2 = new Type; ptr1 = ptr2;