Prevent unrecoverable destruction

You want to prevent unrecoverable destruction of resources when working with the move assignment operator in C++.

Which of these actions if taken will help you achieve this?

  1. Properly handle self-assignment in the move assignment operator.
  2. Free resources such as memory and file handle.
  3. Provide move constructor along with the move assignment operator
  4. None of these

Related Posts

Close Bitnami banner