What is the purpose of destructor ?

Answer Posted / sunil kumar

A destructor is used to destroy the objects that have been
created earlier.Destructor is a member function whose name
is the same as the class name but is preceded by tilde sign.
It never takes any argument nor it returns any value.It`ll
be invoked implicitly by the compiler upon exit from the
program to clean up storage that is no longer accessible.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many data types are there in php?

669


What sized websites have you worked on in the past?

627


Why post method is used in php?

704


What is the function of mysql_real_escape_string in php?

571


How do I install php and apache on windows 10?

604






How to delete a file from the system?

649


How can a cross-site scripting attack be prevented by php?

618


What changes I have to do in php.ini file for file uploading?

644


Which php framework is best for beginners?

607


Explain php explode() function.

637


What are php functions?

649


How to track no of user logged in?

703


How can we increase execution time of a php script?

560


What are the php variables?

620


What are the different types of php variables?

677