Peanutt42
Results
2
comments of
Peanutt42
As @NIKEA-SOFT said, there is no memory leaking - Compiler inlines this function (constexpr) - std::shared_ptr uses reference counting -> previous scene gets deleted - example shows: ```cpp #include #include...
The constexpr specifies that the compiler should inline this function, meaning that this: ``` Ref test = CreateRef(); ``` gets inlined into this: ``` std::shared_ptr test = std::make_shared(); ```