<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Destructor (computer programming) - Page 4 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Destructor_(computer_programming)&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Destructor_%28computer_programming%29&amp;p=5">3.Next</a>
</p>
<p>of resources is done through a lexical construct (such as try-finally, Python's <code>with</code>, or Java's "try-with-resources"), or by explicitly calling a function (equivalent to explicit deletion); in particular, many object-oriented languages use the <a href="page.php?w=dispose_pattern">dispose pattern</a>.</p>

<p><big>Syntax</big></p>
<p>
* <a href="page.php?w=C%2B%2B">C++</a>: destructors have the same name as the class with which they are associated, but with a <a href="page.php?w=tilde">tilde</a> prefix (for example, a class <code>X</code> with</p><p>
<a accesskey="1" href="page.php?w=Destructor_(computer_programming)&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Destructor_%28computer_programming%29&amp;p=5">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
