std::stack::~stack(3)

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

πŸ’– std::stack::~stack πŸ’–

okay bestie, this is the std::stack::~stack page from the C++ Standard Libary manual β€” yes, that’s literally how it’s spelled, and we’re moving on πŸ’…βœ¨


🌸 NAME 🌸

std::stack::~stack β€” std::stack::~stack 🫢

✨ Synopsis ✨

~stack();

Destructs the stack. The destructors of the elements are called and the used storage is deallocated. Note, that if the elements are pointers, the pointed-to objects are not destroyed.

lowkey important, bestie: pointer elements getting destroyed does not mean the things they point to get destroyed too πŸ‘€πŸ’€

πŸ”₯ Complexity πŸ”₯

Linear in the size of the stack.


source/version + date sign-off, mwah: http://cppreference.com Β· 2024.06.10 Β· std::stack::~stack(3) πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from