Content deleted Content added
→Abstract methods: Made link to "abstract class" more specific. |
CortexFiend (talk | contribs) Link suggestions feature: 2 links added. |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 41:
====Finalizers====
In [[Garbage collection (computer science)|garbage-collected]] languages, such as [[Java (programming language)|Java]],<ref name=Bloch>{{cite book | title= "Effective Java: Programming Language Guide" |last=Bloch| first=Joshua| publisher=Addison-Wesley | edition=third | isbn=978-0134685991| year=2018}}</ref>{{rp|26, 29}} [[C Sharp (programming language)|C#]],<ref name=Albahari>{{cite book |last=Albahari |first=Joseph |title= C# 10 in a Nutshell |publisher= O'Reilly |isbn= 978-1-098-12195-2}}</ref>{{rp|208-209}} and [[Python (programming language)|Python]], destructors are known as ''[[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==
Line 102:
==Special methods==
Special methods are very language-specific and a language may support none, some, or all of the special methods defined here. A language's [[compiler]] may automatically generate default special methods or a programmer may be allowed to optionally define special methods. Most special methods cannot be directly called, but rather the compiler generates code to call them at appropriate times.
===Static methods===
|