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

How do you save a c++ program?

1039


Is overriding possible in c++?

1009


Is java easier than c++?

1028


What are the two types of polymorphism?

1137


Describe public access specifiers?

1111


What is jump statement in C++?

1131


What are disadvantages of pointers?

1038


What does return 0 do in c++?

1037


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

1052


Explain dangling pointer.

1127


Is map ordered c++?

1094


Can constructor be private in c++?

1039


What are c++ stream classes?

1048


What does it mean to declare a member variable as static?

1059


Do you know the problem with overriding functions?

1107