GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 17 of 255    Print  
What will happen if I say delete this

  
Total Answers and Comments: 3 Last Update: October 20, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 01, 2005 12:11:24   #1  
Amit Banerjee        

RE: What will happen if I say delete this
Delete this is not acceptable or possible since delete this means we are trying to delete the reference of the object and calling the function from the object itself. 
 
Its like Kalidas , trying to cut the same branch on which you are seating.

 
Is this answer useful? Yes | No
November 07, 2005 05:11:33   #2  
somaraj        

RE: What will happen if I say delete this

The most important point is , The way in which the object is created .

If the object is created on stack - the object will be destroyed twice resulting in crash . First time when delete this is called second time when the stack unwinds.

But if the object is created in heap - delete this may work but that should be the last line using the object.


 
Is this answer useful? Yes | No
October 20, 2006 05:44:22   #3  
harshi        

RE: What will happen if I say delete this
Amit Banerjee Wrote: Delete this is not acceptable or possible since delete this means we are trying to delete the reference of the object and calling the function from the object itself. 
 
Its like Kalidas , trying to cut the same branch on which you are seating.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape