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 dangling pointers?and what is memory leak?

Answer Posted / prakash

dangling pointer : Dangling pointers in computer
programming are pointers that do not point to a valid
object of the appropriate type. Dangling pointers arise
when an object is deleted or deallocated, without modifying
the value of the pointer, so that the pointer still points
to the memory location of the deallocated memory.

memory leak:A memory leak in computer science is a
particular type of unintentional memory consumption by a
computer program where the program fails to release memory
when no longer needed.
ex:
void f(void)
{
void* s;
s = malloc(50); /* get memory */
return;
}
//control comes out w/o freeing the memory....

Is This Answer Correct ?    70 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what are static member functions?

1085


What is #include cstdlib in c++?

1187


What is data types c++?

1020


Why do we use structure in c++?

1082


Is eclipse good for c++?

1052


What is an undefined reference/unresolved external symbol error and how do I fix it?

1124


What is the difference between method overloading and method overriding in c++?

1151


What is a class definition?

1076


What is the purpose of template?

1115


Define copy constructor.

1112


Write a struct time where integer m, h, s are its members?

961


Please explain the reference variable in c++?

1069


Can we change the basic meaning of an operator in c++?

1114


What does int * mean in c++?

1231


How would you call C functions from C++ and vice versa?

1173