21644
![What does this mean ~method( ){ } [duplicate]](https://www.xszz.org/skin/wt/rpic/t10.jpg)
Question:
<blockquote>
<strong>Possible Duplicate:</strong><br /><a href="https://stackoverflow.com/questions/188688/what-does-the-tilde-mean-in-c" rel="nofollow">What does the tilde (~) mean in C#?</a>
</blockquote>What is the meaing of ~ before a method?
I saw this like here:
~myDirect3dClass()
{
}
Answer1:That's the <a href="http://msdn.microsoft.com/en-us/library/66x5fx1b.aspx" rel="nofollow">destructor</a> of a class, aka. the Finalizer.
Answer2:That is a <a href="http://msdn.microsoft.com/en-us/library/66x5fx1b.aspx" rel="nofollow">destructor</a>.
Answer3:That is a <a href="http://msdn.microsoft.com/en-us/library/66x5fx1b%28VS.80%29.aspx" rel="nofollow">Destructor
</a> method of a class. Destructors are used to destruct instances of classes.