summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-05-03 13:20:56 -0400
committerNat Goodspeed <nat@lindenlab.com>2017-05-03 13:20:56 -0400
commit9002e3cbc7a4f7ef2847ab6652de0f11eaff6ef2 (patch)
tree0db9ee1cab65b8597bf65cf9223eb56620e34d84 /indra/llcommon
parent03c1e5e034ccafa83ea90f53513497e3cccc4f54 (diff)
DRTVWR-418: Add big deprecation notice to llsafehandle.h.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llsafehandle.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/llcommon/llsafehandle.h b/indra/llcommon/llsafehandle.h
index 74d31297a0..968a5cfeb1 100644
--- a/indra/llcommon/llsafehandle.h
+++ b/indra/llcommon/llsafehandle.h
@@ -29,6 +29,29 @@
#include "llerror.h" // *TODO: consider eliminating this
#include "llsingleton.h"
+/*==========================================================================*|
+ ____ ___ _ _ ___ _____ _ _ ____ _____ _
+| _ \ / _ \ | \ | |/ _ \_ _| | | | / ___|| ____| |
+| | | | | | | | \| | | | || | | | | \___ \| _| | |
+| |_| | |_| | | |\ | |_| || | | |_| |___) | |___|_|
+|____/ \___/ |_| \_|\___/ |_| \___/|____/|_____(_)
+
+This handle class is deprecated. Unfortunately it is already in widespread use
+to reference the LLObjectSelection and LLParcelSelection classes, but do not
+apply LLSafeHandle to other classes, or declare new instances.
+
+Instead, use LLPointer or other smart pointer types with appropriate checks
+for NULL. If you're certain the reference cannot (or must not) be NULL,
+consider storing a C++ reference instead -- or use (e.g.) LLCheckedHandle.
+
+When an LLSafeHandle<T> containing NULL is dereferenced, it resolves to a
+canonical "null" T instance. This raises issues about the lifespan of the
+"null" instance. In addition to encouraging sloppy coding practices, it
+potentially masks bugs when code that performs some mutating operation
+inadvertently applies it to the "null" instance. That result might or might
+not ever affect subsequent computations.
+|*==========================================================================*/
+
// Expands LLPointer to return a pointer to a special instance of class Type instead of NULL.
// This is useful in instances where operations on NULL pointers are semantically safe and/or
// when error checking occurs at a different granularity or in a different part of the code