On Friday, 21 July 2017 at 11:57:11 UTC, Kagamin wrote:
On Friday, 21 July 2017 at 08:51:27 UTC, Atila Neves wrote:
Mutexes and sockets are classes, so not destroyed deterministically.

They should, like any unmanaged resources

I tend to agree, although

e.g. by wrapping in a smart pointer.

objects that manage their own lifetime limit the design space unnecessarily. It's better to use normal structs to wrap resources (RAII) and then build whatever object lifetime management scheme one wants (including reference counting) on top of that.

Reply via email to