Memory

std::unique_ptr

According to the RAII idiom, a std::unique_ptr manages automatically and exclusively the lifetime of its resource. std::unique_ptr should be your first choice because it does its work without memory or performance overhead.

Read more
Views: 43769

Memory and Performance Overhead of Smart Pointers

C++11 offers four different smart pointers. I will have a closer look in this post regarding memory and performance overhead on two of them. My first candidate, std::unique_ptr takes care of the lifetime of one resource exclusively; std::shared_ptr shares the ownership of a resource with another std::shared_ptr. I will state the result of my tests before I show you the raw numbers: There are only a few reasons in modern C++ justifying the memory management with new and delete.

 

Read more
Views: 143761

Careful Handling of Resources

The careful handling of resources - may it be, for example, memory, files, or sockets - is a key concern of programming in C++. This holds, in particular, true for embedded programming, which is often characterized by limited resources. Therefore, I will write a few posts about this challenging and versatile topic.

Read more
Views: 13669

Stay Informed about my Mentoring

 

Mentoring

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Course: The All-in-One Guide to C++20

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 4466

Yesterday 4550

Week 4466

Month 26140

All 12104349

Currently are 169 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments