\func{}{wxAcceleratorTable}{\param{const wxAcceleratorTable\& }{bitmap}}
-Copy constructor.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\func{}{wxAcceleratorTable}{\param{int}{ n}, \param{wxAcceleratorEntry}{ entries[]}}
\func{wxAcceleratorTable\& }{operator $=$}{\param{const wxAcceleratorTable\& }{accel}}
-Assignment operator. This operator does not copy any data, but instead
-passes a pointer to the data in {\it accel} and increments a reference
-counter. It is a fast operation.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
-Copy constructor. Note that this does not take a fresh copy of the data,
-but instead makes the internal data point to {\it bitmap}'s data. So
-changing one bitmap will change the other. To make a real copy, you can
-use:
+Copy constructor, uses \helpref{reference counting}{trefcount}.
+To make a real copy, you can use:
\begin{verbatim}
wxBitmap newBitmap = oldBitmap.GetSubBitmap(
\func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}}
-Assignment operator. This operator does not copy any data, but instead
-passes a pointer to the data in {\it bitmap} and increments a reference
-counter. It is a fast operation.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\func{}{wxBrush}{\param{const wxBrush\&}{ brush}}
-Copy constructor. This uses reference counting so is a cheap operation.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\func{wxBrush\&}{operator $=$}{\param{const wxBrush\& }{brush}}
-Assignment operator, using reference counting. Returns a reference
-to `this'.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\membersection{wxBrush::operator $==$}\label{wxbrushequals}
\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}}
-Copy constructor. This uses reference counting so is a cheap operation.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\func{wxCursor\&}{operator $=$}{\param{const wxCursor\& }{cursor}}
-Assignment operator, using reference counting. Returns a reference
-to `this'.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\membersection{wxCursor::operator $==$}\label{wxcursorequals}
Default constructor.
+\func{}{wxFont}{\param{const wxFont\&}{ font}}
+
+Copy constructor, uses \helpref{reference counting}{trefcount}.
+
\func{}{wxFont}{\param{int}{ pointSize}, \param{wxFontFamily}{ family}, \param{int}{ style}, \param{wxFontWeight}{ weight},
\param{const bool}{ underline = false}, \param{const wxString\& }{faceName = ""},
\param{wxFontEncoding }{encoding = wxFONTENCODING\_DEFAULT}}
\func{wxFont\&}{operator $=$}{\param{const wxFont\& }{font}}
-Assignment operator, using reference counting. Returns a reference
-to `this'.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\membersection{wxFont::operator $==$}\label{wxfontequals}
\func{}{wxImage}{\param{const wxImage\& }{image}}
-Copy constructor.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\func{}{wxImage}{\param{const wxBitmap\&}{ bitmap}}
\func{wxImage\& }{operator $=$}{\param{const wxImage\& }{image}}
-Assignment operator. This operator does not copy any data, but instead
-passes a pointer to the data in {\it image} and increments a reference
-counter. It is a fast operation.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
of {\bf new} and {\bf delete}, which can help trace memory allocation
and deallocation problems.
-wxObject can be used to implement reference counted objects, such as
-wxPen, wxBitmap and others.
+wxObject can be used to implement \helpref{reference counted}{trefcount} objects,
+such as wxPen, wxBitmap and others (see \helpref{this list}{refcountlist}).
\wxheading{See also}
\latexignore{\rtfignore{\wxheading{Members}}}
-\membersection{wxObjectRefData::m\_count}\label{wxobjectrefdatamcount}
-
-\member{int}{m\_count}
-
-Reference count. When this goes to zero during a \helpref{wxObject::UnRef}{wxobjectunref}, an object
-can delete the {\bf wxObjectRefData} object.
\membersection{wxObjectRefData::wxObjectRefData}\label{wxobjectrefdatactor}
Destructor.
+\membersection{wxObjectRefData::GetRefCount}\label{wxobjectrefdatagetrefcount}
+
+\constfunc{int}{GetRefCount}{\void}
+
+Returns the reference count associated with this shared data.
+When this goes to zero during a \helpref{wxObject::UnRef}{wxobjectunref}, an object
+can delete this {\bf wxObjectRefData} object.
\func{}{wxPalette}{\param{const wxPalette\&}{ palette}}
-Copy constructor. This uses reference counting so is a cheap operation.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\func{}{wxPalette}{\param{int}{ n}, \param{const unsigned char* }{red},\\
\param{const unsigned char* }{green}, \param{const unsigned char* }{blue}}
\func{wxPalette\&}{operator $=$}{\param{const wxPalette\& }{palette}}
-Assignment operator, using reference counting. Returns a reference
-to `this'.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\membersection{wxPalette::operator $==$}\label{wxpaletteequals}
\func{}{wxPen}{\param{const wxPen\&}{ pen}}
-Copy constructor. This uses reference counting so is a cheap operation.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\func{wxPen\&}{operator $=$}{\param{const wxPen\& }{pen}}
-Assignment operator, using reference counting. Returns a reference
-to `this'.
+Assignment operator, using \helpref{reference counting}{trefcount}.
\membersection{wxPen::operator $==$}\label{wxpenequals}
\func{}{wxRegion}{\param{const wxRegion\&}{ region}}
-Constructs a region by copying another region.
+Copy constructor, uses \helpref{reference counting}{trefcount}.
\func{}{wxRegion}{\param{size\_t}{ n}, \param{const wxPoint }{*points}, \param{int }{fillStyle = wxWINDING\_RULE}}
\func{void}{operator $=$}{\param{const wxRegion\&}{ region}}
-Copies {\it region} by reference counting.
+Assignment operator, using \helpref{reference counting}{trefcount}.
+
+
\section{\class{wxRegionIterator}}\label{wxregioniterator}
This chapter contains a selection of topic overviews.
-\input tchanges.tex
+%\input tchanges.tex -- deprecated: look at docs/changes.txt instead
\input tusage.tex
\input tguide.tex
\input hworld.tex
\input tsamples.tex
\input tapp.tex
\input truntime.tex
+\input trefcount.tex
\input tstring.tex
\input tbuffer.tex
\input tdate.tex
\input re_syntax.tex
\input arc.tex
\input backwardcompat.tex
-
\subsection{Reference counting and why you shouldn't care about it}\label{wxstringrefcount}
-wxString objects use a technique known as {\it copy on write} (COW). This means
-that when a string is assigned to another, no copying really takes place: only
-the reference count on the shared string data is incremented and both strings
-share the same data.
-
-But as soon as one of the two (or more) strings is modified, the data has to be
-copied because the changes to one of the strings shouldn't be seen in the
-others. As data copying only happens when the string is written to, this is
-known as COW.
-
-What is important to understand is that all this happens absolutely
-transparently to the class users and that whether a string is shared or not is
-not seen from the outside of the class - in any case, the result of any
-operation on it is the same.
+All considerations for wxObject-derived \helpref{reference counted}{trefcount} objects
+are valid also for wxString, even if it does not derive from wxObject.
Probably the unique case when you might want to think about reference
counting is when a string character is taken from a string which is not a