Well I'm not sure if this is a memory leak or not. I'm pretty certain it is, but need the view of a more experienced programmer.
At first glance (to me at least) it looks like a memory leak because the buffer can apparently not be free'd.Code:// for example char* get_buffer() { char* buffer = malloc(20 * sizeof(char)); // etc return buffer; // memory leak? }
How would I get around this without the use of gloabal variables?



LinkBack URL
About LinkBacks
.



I used to be an adventurer like you... then I took an arrow to the knee.
? Are we saying the "Super Moderator" didn't point out the right problem and I got it right
? I really wouldn't expect that as a freshman to C++ though.