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

give me an example for testing a program showing the test path .show how the test is important and complex.

2859


What is a dynamic binding in c++?

903


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

4071


Why do we use pointers in c++?

970


What is class in c++ with example?

1129


What are iterators in c++?

962


What are the comments in c++?

944


If dog is a friend of boy, is boy a friend of dog?

930


What do the keywords volatile and mean mutable?

1005


How would you find out if a linked-list is a cycle or not?

956


Explain the isa and hasa class relationships. How would you implement each?

1064


What is the difference between an enumeration and a set of pre-processor # defines?

1327


What is the main purpose of c++?

1012


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

915


Explain operator overloading.

1001