3 ms·
Your “RAII“ object can also be transferred if it supports move semantics (it really should). Both classes hold a unique resource (a file handle resp. a heap all
by spacechild1 5y ago
Your “RAII“ object can also be transferred if it supports move semantics (it really should). Both classes hold a unique resource (a file handle resp. a heap allocated object) that can be moved but not copied and the resource gets freed when the variable goes out of scope.