Monatsarchiv: Oktober 2017

Manage resources by using smart pointer RAII objects

A common way to create objects is by using a factory method or an abstract factory. Such a factory will normally create and return the object and handover the responsibility over the object to the client. Therefore the client has … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Virtual Destructor

You may have heard the advice that a destructor should be declared as virtual in case you use the class as a base class. Within this article I want to show the technical background behind this advice and want to … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Virtual functions in ctor and dtor

During construction and destruction of an object you are able to call virtual functions. But you should not do this. That’s because it is a source for errors as the behavior of the application may be differ from your expectations … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Design patterns: Strategy

The strategy design pattern is used in case different algorithms are implemented and shall vary dynamically dependent on the use case. Very often, you can implement functionality in different ways. In most use cases you look at the pros and … Weiterlesen

Veröffentlicht unter Design Pattern, Designprinzip, Uncategorized | Kommentar hinterlassen

Show costs of Quick & Dirty implementations

I am sure you all know this issue: There are situations where you have to implement something in a quick & dirty manner. You know that this way of implementation is wrong. And you be afraid of or maybe know … Weiterlesen

Veröffentlicht unter Projektleitung | Kommentar hinterlassen