summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-04-25 20:21:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-04-25 20:21:07 (GMT)
commit9bf722e8da25eb28ed58fe97f941f4badaa3af36 (patch)
treeb5b57dca08c205c06c32f5d8701ff49c1ed0d36c
parent5003483b1d2f1aec9e404ab053ca9b00da9f087a (diff)
downloadtcl-9bf722e8da25eb28ed58fe97f941f4badaa3af36.zip
tcl-9bf722e8da25eb28ed58fe97f941f4badaa3af36.tar.gz
tcl-9bf722e8da25eb28ed58fe97f941f4badaa3af36.tar.bz2
Documenting our reference count management
-rw-r--r--doc/TraceVar.38
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/TraceVar.3 b/doc/TraceVar.3
index 82aa7b8..7751cf7 100644
--- a/doc/TraceVar.3
+++ b/doc/TraceVar.3
@@ -359,6 +359,14 @@ Traces on a variable are always removed whenever the variable
is deleted; the only time \fBTCL_TRACE_DESTROYED\fR is not set is for
a whole-array trace invoked when only a single element of an
array is unset.
+.SH "REFERENCE COUNT MANAGEMENT"
+.PP
+When a \fIproc\fR callback is invoked, and that callback was installed with
+the \fBTCL_TRACE_RESULT_OBJECT\fR flag, the result of the callback is a
+Tcl_Obj reference when there is an error. The result will have its reference
+count decremented once when no longer needed, or may have additional
+references made to it (e.g., by setting it as the interpreter result with
+\fBTcl_SetObjResult\fR).
.SH BUGS
.PP
Array traces are not yet integrated with the Tcl \fBinfo exists\fR command,