Re: how to delete this?
From: Gernot Frisch (Me_at_Privacy.net)
Date: 07/26/04
- Next message: Karl Heinz Buchegger: "Re: Solution to the halting Problem?"
- Previous message: Karl Heinz Buchegger: "Re: Solution to the halting Problem?"
- In reply to: Kyle: "how to delete this?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jul 2004 11:25:32 +0200
"Kyle" <zhouzhendong@hotmail.com> schrieb im Newsbeitrag
news:4104cc86@dnews.tpgi.com.au...
> I have the following codes
>
> int (*p)[2];
> p=new int [4][2];
> ...
> delete [] p;
>
> is the way to free the memory correct?
Yep. delete [] p; p=NULL; // indicate it's invalid!
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
- Next message: Karl Heinz Buchegger: "Re: Solution to the halting Problem?"
- Previous message: Karl Heinz Buchegger: "Re: Solution to the halting Problem?"
- In reply to: Kyle: "how to delete this?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|