Improvements of this Blog
In my post Time for Wishes, I asked: “How can I improved my blog?” And here are the answers.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 683 entries already.
In my post Time for Wishes, I asked: “How can I improved my blog?” And here are the answers.
What is common between all containers of the Standard Template Library? They have a type parameter Allocator that is by default std::allocator. The job of the allocator is to manage the lifetime of its elements. That means allocating and deallocating memory for its elements and initializing and destroying them.
I overloaded in the last post operator new and delete. Therefore, finding memory leaks and getting the first hint of the bad guys. My solution had two not-so-nice properties. With this post, I will overcome them.
It happens quite too often that a C++ application allocates memory but doesn’t deallocate it. This is the job of the operator to new and delete. Thanks to them both, you can explicitly manage the memory management of an application.
Explicit memory management has in C++ a high complexity but also provides great functionality. Sadly, this special domain is not so known in C++. For example, you can directly create objects in static memory, in a reserved area, or even a memory pool. That is functionality, which is often key in safety-critical applications in the […]
C++ is old-fashioned. C++ has no garbage collection. No garbage collection? Right! Old fashioned? Wrong!
Today, we solve ” … a herefore unsolved problem in C++” (Bjarne Stroustrup). To make the long story short, I will write about perfect forwarding.
I wrote more than 130 posts in my German blog about functional programming, embedded programming and multithreading programming with modern C++. My English blog will catch up in two months with my German one. Therefore, it’s the right time to rework my blogs. The German blog and the English blog in parallel.
I will talk about two nice properties of the move semantic in this post that is not so often mentioned. Containers of the standard template library (STL) can have non-copyable elements. The copy semantic is the fallback for the move semantic. Irritated? I hope so!
A lot was written about the advantages of move semantics to copy semantics. Instead of an expensive copy operation, you can use a cheap move operation. But what does that mean? In this post, I will compare the copy and move semantics performance for the Standard Template Library (STL) containers.