Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is a memory leak? How to avoid it?

Answer Posted / hrpynux@gmail.com

Memory leak occurs when programmers create a memory in heap and forget to delete it. ... To avoid memory leaks, memory allocated on heap should always be freed when no longer needed.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you initialize pointer variables?

1107


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1125


What is const volatile variable in c?

1038


What are global variables and explain how do you declare them?

1108


Are the variables argc and argv are always local to main?

1026


What is malloc calloc and realloc in c?

1338


What is the equivalent code of the following statement in WHILE LOOP format?

1307


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1768


how to create duplicate link list using C???

2561


Is c still used?

1049


p*=(++q)++*--p when p=q=1 while(q<=6)

1764


Is c procedural or functional?

1039


What is a program flowchart and explain how does it help in writing a program?

1312


What is wrong with this program statement? void = 10;

1259


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1097