src/corelib/tools/qsharedpointer.cpp
changeset 37 758a864f9613
parent 18 2f34d5167611
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
    65 
    65 
    66     \section1 Thread-Safety
    66     \section1 Thread-Safety
    67 
    67 
    68     QSharedPointer and QWeakPointer are thread-safe and operate
    68     QSharedPointer and QWeakPointer are thread-safe and operate
    69     atomically on the pointer value. Different threads can also access
    69     atomically on the pointer value. Different threads can also access
    70     the same QSharedPointer or QWeakPointer object at the same time
    70     the QSharedPointer or QWeakPointer pointing to the same object at
    71     without need for locking mechanisms.
    71     the same time without need for locking mechanisms.
    72 
    72 
    73     It should be noted that, while the pointer value can be accessed
    73     It should be noted that, while the pointer value can be accessed
    74     in this manner, QSharedPointer and QWeakPointer provide no
    74     in this manner, QSharedPointer and QWeakPointer provide no
    75     guarantee about the object being pointed to. Thread-safety and
    75     guarantee about the object being pointed to. Thread-safety and
    76     reentrancy rules for that object still apply.
    76     reentrancy rules for that object still apply.
   480 
   480 
   481     Creates a QSharedPointer that points to \a ptr. The pointer \a ptr
   481     Creates a QSharedPointer that points to \a ptr. The pointer \a ptr
   482     becomes managed by this QSharedPointer and must not be passed to
   482     becomes managed by this QSharedPointer and must not be passed to
   483     another QSharedPointer object or deleted outside this object.
   483     another QSharedPointer object or deleted outside this object.
   484 
   484 
   485     The \a deleter paramter specifies the custom deleter for this
   485     The \a deleter parameter specifies the custom deleter for this
   486     object. The custom deleter is called when the strong reference
   486     object. The custom deleter is called when the strong reference
   487     count drops to 0 instead of the operator delete(). This is useful,
   487     count drops to 0 instead of the operator delete(). This is useful,
   488     for instance, for calling deleteLater() in a QObject instead:
   488     for instance, for calling deleteLater() in a QObject instead:
   489 
   489 
   490     \code
   490     \code