Re: pointer question
Re: pointer question
- Subject: Re: pointer question
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 3 Jul 2001 04:04:41 -0700
On Tuesday, July 3, 2001, at 01:10 AM, Candide Kemmler wrote:
Once the loop's finished and I've done what I have to do with the data
(I must sort the polygons and then draw them), do I have to free ()
every aRoad pointer, and in every road, every points pointer ???
malloc() and free() are symmetrical. Anthing you malloc, you should
free. Every time you call malloc, you create an entry in the malloc
table. From a quick glance through your code, I see you calling malloc
twice, and so you should call free twice.
Incidentally, this would all be considerably easier if you were working
in Objective-C.
-jcr
"The right to be heard does not include the right to be taken
seriously." - Hubert Humphrey