Sunday, July 15, 2012

RAII

The replacement for RAII in .NET is the using-pattern, which works almost as well once you get used to it.
Rasmus Faber
http://stackoverflow.com/questions/173670/why-is-there-no-raii-in-net 

There's some similar threads if you search for them but basicly what it boils down to is that if you want to RAII on .NET simply implement an IDisposable type and use the "using" statement to get deterministic Disposal
Torbjörn Gyllebring

No comments:

Post a Comment