Dispose pattern: Difference between revisions

Content deleted Content added
m Disambiguating links to .net (disambiguation) (link changed to .NET Framework) using DisamAssist.
Line 95:
To make the safe use of the dispose pattern less verbose, several languages have some kind of built-in support for resources held and released in the same [[Block (programming)|block of code]].
 
The [[C Sharp (programming language)|C#]] language features the <code>using</code> statement <ref>Microsoft MSDN: [http://msdn.microsoft.com/en-us/library/yh598w02.aspx using Statement (C# Reference)]</ref> that automatically calls the <code>Dispose</code> method on an object that implements the <code>IDisposable</code> [[interface (computer science)|interface]]:
 
<syntaxhighlight lang="csharp">