Skip to content

Max's Blog

  • Home
  • About
Max's Blog

Category: Programming

September 6, 2021 max-sperling

Deleter – std::shared_ptr vs. std::unique_ptr

For the std::unique_ptr the deleter is part of the type and the std::shared_ptr keeps it as part of its control

Continue reading
August 20, 2021 max-sperling

Types of mutexes and locks (C++)

Mutexes (Selection) … synchronizes the access on critical sections std::mutex Provides exclusive access (can only be pulled by one thread

Continue reading
June 7, 2021 max-sperling

Null-terminated strings (C++)

If you are working with strings you have two basic ways to define its length. Either you write a specific

Continue reading
April 19, 2021 max-sperling

Active vs. passive waiting (C++)

Active waiting Don’t use this approach, because it will unnecessarily consume CPU time. The sleep reduces the CPU consumption, but

Continue reading
February 22, 2021 max-sperling

The Pitchfork Layout (C++)

I recently stumbled over ‘The Pitchfork Layout‘ and I know there are so many ways to order your project files,

Continue reading
February 15, 2021 max-sperling

Declaration specifiers (C++)

The following list is just a selection. Specifier Variable Function const Can’t be modified.1 Method: Can’t modify its fields.1 constexp

Continue reading
February 4, 2021 max-sperling

Position of Ptr. / Ref. (C++)

There are two common ways for the position of the pointer sign (*) or the reference sign (&). C-Style ClassA

Continue reading
February 3, 2021 max-sperling

When and how to pass smart pointer (C++)

This post is based on a post from Herb Sutter. When if (The ownership of the object isn’t shared or

Continue reading
December 11, 2020 max-sperling

Layout of std::shared_ptr (libstdc++)

Source code Debugging Visual result |———————-| | shared_ptr sPtr1 | |———————-| |Pointer to the Object |—|——-> Object | | |

Continue reading
September 29, 2020 max-sperling

Lambda captures (C++)

Setup lambda auto func = [/*capures*/](/*arguments*/){/*body*/}; Specify captures <var> … Local variable by value &<var> … Local variable by reference

Continue reading

Posts navigation

«Previous Posts 1 2 3 4 5 6 7 Next Posts»

Categories

  • Other (19)
    • Games (13)
    • Nutrition (4)
    • Traveling (2)
  • Science (17)
    • Chemistry (3)
    • Linguistics (2)
    • Math (10)
    • Physics (2)
  • Sport (73)
    • Climbing (5)
    • Diving (20)
    • Fitness (8)
    • Martial arts (34)
      • Ground fighting (9)
      • Mixed martial arts (4)
      • Stand-up fighting (12)
    • Running (1)
    • Surfing (2)
    • Swimming (1)
    • Volleyball (2)
  • Technology (288)
    • Computer (258)
      • Architecture & Design (15)
      • Artificial intelligence (3)
      • Audio & Video (11)
      • Building & Reversing (15)
        • CMake (2)
      • Computational complexity (3)
      • Computer architecture (4)
      • Debugging & Memory (29)
      • Development (72)
        • CI/CD (1)
        • Programming (61)
          • Concurrency (12)
          • Data structures (13)
          • Pointers & References (7)
        • Scripting (4)
        • Testing (6)
      • Development process (5)
      • Hacking & Security (17)
      • Hardware & Protocols (8)
      • Networking (11)
      • Operating system (21)
        • Linux (12)
        • Windows (8)
      • Regular expression (2)
      • Tool configuration (5)
      • Version control (22)
      • Virtualization (7)
      • Web (29)
    • Electrics (9)
    • Mechanics (15)
    • Medicine (2)
    • Photography (4)
WordPress Theme: Wellington by ThemeZee.