About
Contact
QtCreator
KDevelop
Solarized
1
#include
<memory>
2
3
struct
Foo
{
4
int
a
;
5
};
6
7
int
main
(
int
argc
,
char
**
argv
) {
8
std::
shared_ptr
<
Foo
>
s
(
new
Foo
);
9
s
->
a
=
3
;
10
std::
weak_ptr
<
Foo
>
w
=
s
;
11
return
s
->
a
;
// Set break point at this line.
12
}
13