From: Richard Kreckel Date: Thu, 26 Dec 2002 16:57:46 +0000 (+0000) Subject: * documentation update. X-Git-Tag: release_1-1-0~45 X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=8e1f5db505e7c02a5da3c42dc890b35bfea5ce59;p=ginac.git * documentation update. --- diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index 0b9acc36..cb586a8b 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -5471,12 +5471,18 @@ any other programming language. @cindex reference counting @cindex copy-on-write @cindex garbage collection -An expression is extremely light-weight since internally it works like a -handle to the actual representation and really holds nothing more than a -pointer to some other object. What this means in practice is that -whenever you create two @code{ex} and set the second equal to the first -no copying process is involved. Instead, the copying takes place as soon -as you try to change the second. Consider the simple sequence of code: +In GiNaC, there is an @emph{intrusive reference-count} mechanism at work +where the counter belongs to the algebraic objects derived from class +@code{basic} but is maintained by the wrapper class @code{ex}. If you +understood that, you can safely skip the rest of this passage. + +Expressions are extremely light-weight since internally they work like +handles to the actual representation. They really hold nothing more +than a pointer to some other object. What this means in practice is +that whenever you create two @code{ex} and set the second equal to the +first no copying process is involved. Instead, the copying takes place +as soon as you try to change the second. Consider the simple sequence +of code: @example #include