blob: 7ba50875a6db9f5350c0e622e0ab508e152db7ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <memory>
#include <string>
int
main()
{
std::shared_ptr<char> nsp;
std::shared_ptr<int> isp(new int{123});
std::shared_ptr<std::string> ssp = std::make_shared<std::string>("foobar");
std::weak_ptr<char> nwp;
std::weak_ptr<int> iwp = isp;
std::weak_ptr<std::string> swp = ssp;
nsp.reset(); // Set break point at this line.
isp.reset();
ssp.reset();
return 0; // Set break point at this line.
}
|