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 will happen if when say delete this ?

Answer Posted / hitout

There are different cases to this
1) If the memory is allocated in stack, delete this should
not be called since it calls destructor twice.
2) delete this can be called in all functions except
destructor if the memory is allocated on heap(ie if new
operator is used and the object is not explicitly deleted).

3) Delete this in destructor will always cause an infinite loop.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the real purpose of class – to export data?

1059


What is the prototype of printf function?

1119


daily Routine of father

1357


What is the purpose of extern storage specifier?

1101


What is the difference between ++ count and count ++?

1087


Is swift faster than c++?

960


Can a new be used in place of old mallocq? If yes, why?

1039


When should you use global variables?

1150


What gives the current position of the put pointer?

942


What are the different types of polymorphism in c++?

1067


Explain the uses of static class data?

1055


What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack

1027


How did c++ get its name?

982


the first character in the variable name must be an a) special symbol b) number c) alphabet

1042


What is the basic structure of c++ program?

1036