4 ms·
std::shared_ptr works, but fyi often there's a slightly better alternative. For cases where the target object is not shared between asynchronous threads, mse::T
by duneroadrunner 10y ago
std::shared_ptr works, but fyi often there's a slightly better alternative. For cases where the target object is not shared between asynchronous threads, mse::TRefCountingPointer[1] is smaller/safer/faster/more scalable. For cases where the target is shared between threads (while being modified) mse::TAsyncSharedReadWriteAccessRequester[2] is safer.
[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus#reference-counting-pointers https://github.com/duneroadrunner/SaferCPlusPlus#reference-c...
[2] https://github.com/duneroadrunner/SaferCPlusPlus#asynchronously-shared-objects https://github.com/duneroadrunner/SaferCPlusPlus#asynchronou...