Pre Compiled Headers

Brendon Costa bcosta@avdat.com.au
Wed Feb 14 00:54:00 GMT 2007


Mike Stump wrote:
> On Feb 13, 2007, at 3:16 PM, Brendon Costa wrote:
>> There is no "additional" pain in doing this as I have already
>> developed my code using manual malloc/free in such a way that i am
>> reasonably sure there are no leaks, or double free calls or the like.
> 
> No, the pain would be a dangling pointer.  You cannot call ggc_free
> unless there are no references, anywhere in live memory.
> 
> 

Ahh. Yep, I didn't quite understand what you mean by over-zealous
freeing before :-) I can see the problem.

I guess ill leave the freeing of memory to the garbage collector
unless i find that the memory usage is too high, in which case i guess
i could manually invoke the collector or there are a number of places
where it will be safe to explicitly free memory as it will only ever
be referenced in a single location. But no need for premature
optimization...

Thanks,
Brendon.



More information about the Gcc mailing list