Free LoopI m a little used to calling outside your nameI wont see you tonight so I can keep from going insaneBut I don t know enough, I get some kinda lazy dayHey yeahI ve been fabulous through to fig
This questi开发者_开发知识库on already has answers here: Closed 12 years ago. Possible Duplicate:
This question already has answers here: Closed 12 years ago. Possible Duplicate: C programming : How does free know how much to free?
I have a struct struct request { int code; char *message; }; that I\'d like to free properly. I have the following function to do that:
my first question on Stackoverflow. Let me start with a bit of code.It\'s a bit repetitive so I\'m going to cut out the parts I repeat for different arrays (feel free to ask for the o开发者_StackOver
Suppose I write my code very defensively and always check the return types from all the functions that I call.
My app is running out of memory. To resolve this, I free up two very large arrays used in a function that writes a framebuffer to an image. The method looks like this:
My program (a text-mode web browser) is dynamically allocating memory. I do free unneeded blocks during runtime, of course. And I do free everything before normal termination - so that memory leak ch
I have been running into errors where objects are somehow freed but we end up calling FreeMem on them.Of course this causes an error since the memory has already been freed and throws an error.
This question was asked to me in an interview: InC++, what if we allocate memory using malloc and use delete to free that allocated memory?