Skip to content

Commit 1192470

Browse files
author
Amanda Butler
authored
Fix spacing.
Fix spacing in SharedPtr.md
1 parent 6cf985e commit 1192470

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

docs/reference/api/platform/SharedPtr.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
## Shared Pointer
22

3-
A shared pointer is a "smart" pointer that retains ownership of an object by using
4-
reference counting accross all smart pointers referencing that object.
3+
A shared pointer is a "smart" pointer that retains ownership of an object by using reference counting accross all smart pointers referencing that object.
54

65
It is similar to the `std::shared_ptr` class introduced in C++11. However, this is not a compatible implementation, as there are no weak pointers, no `make_shared`, no custom deleters, and so on.
76

87
Usage: `SharedPtr<Class> ptr(new Class())`
98

10-
When `ptr` is passed around by a value, the copy constructor and
11-
destructor manage the reference count of the raw pointer.
12-
If the counter reaches zero, `delete` is called on the raw pointer.
9+
When `ptr` is passed around by a value, the copy constructor and destructor manage the reference count of the raw pointer. If the counter reaches zero, `delete` is called on the raw pointer.
1310

14-
To avoid loops, use "weak" references by calling the original
15-
pointer directly with `ptr.get()`.
11+
To avoid loops, use "weak" references by calling the original pointer directly with `ptr.get()`.
1612

1713

1814
### SharedPtr class reference

0 commit comments

Comments
 (0)