Yes , i havenīt the segmentation problem now!Quote:
Originally Posted by Salem
but how can i know if all the mem is free??
Printable View
Yes , i havenīt the segmentation problem now!Quote:
Originally Posted by Salem
but how can i know if all the mem is free??
Aha!!, but i only need 1 objectQuote:
Originally Posted by Salem
> but how can i know if all the mem is free??
Well the number of malloc calls matches the number of free calls. So long as you pass the pointer you got from malloc to free, all will be well (assuming you didn't pass a corrupt pointer, and it hasn't fallen over just yet).
> Aha!!, but i only need 1 object
Today - there's always tomorrow and any other program you may write.
No need for sloppy implementation just because "I only need 1"