summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qsharedpointer.cpp')
-rw-r--r--src/corelib/tools/qsharedpointer.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index ad8a3789084..ded0921f685 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -957,20 +957,13 @@
function can determine that the pointer has already been deleted, it
returns \nullptr.
- It is ok to obtain the value of the pointer and using that value itself,
- like for example in debugging statements:
-
- \snippet code/src_corelib_tools_qsharedpointer.cpp 10
+ It is ok to obtain the value of the pointer and using that value itself.
However, dereferencing the pointer is only allowed if you can guarantee
by external means that the pointer does not get deleted. For example,
if you can be certain that no other thread can delete it, nor the
functions that you may call.
- If that is the case, then the following code is valid:
-
- \snippet code/src_corelib_tools_qsharedpointer.cpp 11
-
Use this function with care.
\sa isNull(), toStrongRef()