mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
Documentation: Remove extra <hr>
s from the smart pointers reference
They are either redundant or duplicated from GitHub's formatting
This commit is contained in:
parent
954b7ffb52
commit
336bfb9e88
Notes:
github-actions[bot]
2024-08-17 17:52:08 +00:00
Author: https://github.com/circl-lastname Commit: https://github.com/LadybirdBrowser/ladybird/commit/336bfb9e88d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1062 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/jamierocks Reviewed-by: https://github.com/sideshowbarker
1 changed files with 0 additions and 5 deletions
|
@ -1,14 +1,11 @@
|
||||||
# AK smart pointers
|
# AK smart pointers
|
||||||
|
|
||||||
----
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
There are three main C++ smart pointer types used in Ladybird. Each type describes the ownership (or lack thereof) of the pointee.
|
There are three main C++ smart pointer types used in Ladybird. Each type describes the ownership (or lack thereof) of the pointee.
|
||||||
|
|
||||||
The reason for using these pointers is to make it explicit through code who owns which resources, and how ownership is transferred. They also serve as a guard against memory leaks and use-after-free bugs.
|
The reason for using these pointers is to make it explicit through code who owns which resources, and how ownership is transferred. They also serve as a guard against memory leaks and use-after-free bugs.
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
## OwnPtr\<T\> and NonnullOwnPtr\<T\>
|
## OwnPtr\<T\> and NonnullOwnPtr\<T\>
|
||||||
|
|
||||||
`OwnPtr` is used for single-owner objects. An object held in an `OwnPtr` is owned by that `OwnPtr`, and not by anybody else.
|
`OwnPtr` is used for single-owner objects. An object held in an `OwnPtr` is owned by that `OwnPtr`, and not by anybody else.
|
||||||
|
@ -68,7 +65,6 @@ In this case, the *non-throwing* `new` should be used to construct the raw point
|
||||||
|
|
||||||
**Note:** Always prefer the helper functions to manual construction.
|
**Note:** Always prefer the helper functions to manual construction.
|
||||||
|
|
||||||
----
|
|
||||||
## RefPtr\<T\> and NonnullRefPtr\<T\>
|
## RefPtr\<T\> and NonnullRefPtr\<T\>
|
||||||
|
|
||||||
`RefPtr` is used for multiple-owner objects. An object held by a `RefPtr` is owned together by every pointer pointing to that object.
|
`RefPtr` is used for multiple-owner objects. An object held by a `RefPtr` is owned together by every pointer pointing to that object.
|
||||||
|
@ -133,7 +129,6 @@ In this case, the *non-throwing* `new` should be used to construct the raw point
|
||||||
|
|
||||||
**Note:** Always prefer the helper functions to manual construction.
|
**Note:** Always prefer the helper functions to manual construction.
|
||||||
|
|
||||||
----
|
|
||||||
## WeakPtr\<T\>
|
## WeakPtr\<T\>
|
||||||
|
|
||||||
`WeakPtr` is used for objects that somebody else owns. When the pointee of a `WeakPtr` is deleted, the `WeakPtr` will magically become null.
|
`WeakPtr` is used for objects that somebody else owns. When the pointee of a `WeakPtr` is deleted, the `WeakPtr` will magically become null.
|
||||||
|
|
Loading…
Reference in a new issue