+{\bf wxWeakRef} is a template class for weak references to wxWidgets objects,
+such as {\bf wxEvtHandler}, {\bf wxWindow} and {\bf wxObject}. A weak
+reference behaves much like an ordinary pointer, but when the object pointed
+to goes out of scope (is destroyed), the weak reference is automatically
+reset to a NULL pointer.
+
+wxWeakref<T> can be used whenever one must keep a pointer to an object
+that does not directly own, and that may be destroyed before the object
+holding the reference.
+
+wxWeakref<T> is a small object and the mechanism behind it is fast
+({\bf O(1)}). So the overall cost of using it is small.
+
+
+\wxheading{Example}
+
+\begin{verbatim}
+ wxWindow *parent = /* Get parent window from somewhere */;
+ wxWindow *wnd = new wxWindow( parent, wxID_ANY, "wxWindow" );
+ wxWeakRef<wxWindow> wr = wnd;
+ wxWindowRef wr2 = wnd; // Same as above, but using a typedef
+ // Do things with window
+ wnd->Show( true );
+ // Weak ref is used like an ordinary pointer
+ wr->Show( false );
+ wnd->Destroy();
+ // Now the weak ref has been reset, so we don't risk accessing
+ // a dangling pointer:
+ wxASSERT( wr==NULL );
+\end{verbatim}
+
+wxWeakref<T> works for any objects that are derived from {\bf wxTrackableBase}
+or {\bf wxTrackable}. By default, wxEvtHandler and wxWindow derive from
+wxTrackableBase. However, wxObject does not, so types like {\bf wxFont} and
+{\bf wxColour} are not trackable. The example below shows how to create a
+wxObject derived class that is trackable: