[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

    Search the Q&A Archives

...memory leak & how to solve this problem?

<< Back to: [alt.comp.lang.learn.c-c++] - FAQ list

Question by jyoti
Submitted on 12/17/2003
Related FAQ: [alt.comp.lang.learn.c-c++] - FAQ list
Rating: Rate this question: Vote
what is memory leak & how to solve this problem?

Answer by balasubramanian
Submitted on 2/4/2004
Rating:  Rate this answer: Vote
I am a begginer my self so this info might be incomplete / wrong !!?
From what i know : A memory leak can be thought of as the condition when we allocate memory at run time (using pointers , by using new operator in 'C++' or malloc / calloc in 'C') and later fail to deallocate that memory(by using the 'delete' operator in c++). By failing to deallocate the memory of the variable we are essentialy wasting / leaking away those many bytes which would otherwise be recycled by the system to be used again.
In effect , if we are do a lot of dynamic allocation in our prog. and failing to deallocate then the system will run out of memory and the program would hang or crash.
I hope that this was helpful for you...


Answer by Blastra
Submitted on 9/11/2004
Rating: Not yet rated Rate this answer: Vote
How can u get rid of Leaks without being a programmer to deallocate the memory, or buying an outrageous price prg to do it for you....?


Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.

Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.


FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.


<< Back to: [alt.comp.lang.learn.c-c++] - FAQ list

[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.