std::experi...ue_resource(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

std::experimental::unique_resource::~unique_resource β€” bestie, this is literally the destructor for std::experimental::unique_resource, and yes, it's from the C++ Standard Library manual, page std::experi...ue_resource(3). We're doing this. πŸ’…


✨ Synopsis ✨

~unique_resource();  (library fundamentals TS v3)

okay so here's the tea: this destructor disposes the resource by calling the deleter with the underlying resource handle if the unique_resource owns it β€” which is equivalent to calling reset(). Then it destroys the stored resource handle and the deleter. Cleanup queen behavior, no cap. 🧹✨


πŸ‘€ See also πŸ‘€

  • reset β€” disposes or replaces the managed resource (public member function) 🫢
  • destructor β€” destructs the managed object if such is present (public member function of std::unique_ptr<T,Deleter>) πŸ’–

source: cppreference.com Β· date/version: 2024.06.10 β€” k bye, go destroy some resources responsibly, bestie. πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from