Hard
make_shared with an outstanding weak_ptr
Immediately after line (1) executes, which statement describes the Frame object and the memory it occupied?
main.cpp
#include <array>
#include <iostream>
#include <memory>
struct Frame {
std::array<char, 256 * 1024 * 1024> pixels; // 256 MiB, stored inline
~Frame() { std::cout << "~Frame\n"; }
};
int main() {
auto sp = std::make_shared<Frame>();
std::weak_ptr<Frame> watcher = sp;
sp.reset(); // (1)
// ... long-running work; watcher is still alive here ...
}113 of 117 in C++