Exception Safety and IDisposable Factories


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /var/www/abel.nu/coding.abel.nu/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

C# is mostly relieved from the stress of exception safety, thanks to garbage collections. But in some cases it must be handled. A common case is factories creating more than one IDisposable object. Coming from a C++ background, the notion of exception safety is natural to me. For a C++ developer exception safety is as… Continue reading Exception Safety and IDisposable Factories

IDisposable and using in C#

C# and the .NET environment have automatic memory management through garbage collection. Coming from C++ I think it’s great to not having to worry about memory deallocation. Unfortunately memory from the managed heap (which is where C# objects are placed)  is just one kind of resource in a system. There are several other types of… Continue reading IDisposable and using in C#