• Traister101@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      Douno off the top of my head. To take a wild guess they might just wrap a file handle and give it s nice api? If that’s what they do then moving from the file zeros out he handle for basically the same reason smart pointers set their internal pointer to nullptr, so they don’t delete it (or close the file in this case) underneath the new object.