Method (computer programming): Difference between revisions

Content deleted Content added
m Reverting possible vandalism by Sianhallett3 to version by Jarble. Report False Positive? Thanks, ClueBot NG. (2384904) (Bot)
Destructors: +Finalizers
Line 62:
 
===Destructors===
A ''[[Destructor (computer science)|''destructor'']]'' is a method that is called automatically at the end of an object's lifetime, a process called [[object lifetime|destruction]]. Destruction in most languages does not allow destructor method arguments nor return values. Destruction can be implemented so as to perform cleanup chores and other tasks at object destruction.
 
====Finalizers====
In [[Garbage collection (computer science)|garbage-collected]] languages, such as [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]], and [[Python (programming language)|Python]], destructors are mostly replaced with ''[[finalizer]]s''. They have a similar purpose and function to destructors, but because of the differences between languages that utilize garbage-collection and languages with manual memory management, the sequence in which they are called is different.
 
==Abstract methods==