]> git.saurik.com Git - wxWidgets.git/commitdiff
warn the user about using getters of objects in invalid state
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Fri, 21 Mar 2008 18:04:00 +0000 (18:04 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Fri, 21 Mar 2008 18:04:00 +0000 (18:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/doxygen/overviews/refcount.h

index 8aab3dd2ff193a87a4e8a276c6a2d11706dea998..48a2bf1bb7d5cb94de042b29ab0aceab416fe648 100644 (file)
@@ -53,7 +53,7 @@ provide comparison operators.
 
 Also note that if you only need to do a @c shallow comparison between two
 wxObject derived classes, you should not use the == and != operators but
-rather the wxObject::IsSameAs function.
+rather the wxObject::IsSameAs() function.
 
 
 @section overview_refcount_destruct Object Destruction
@@ -90,6 +90,11 @@ operators and copy constructors since they are reference-counted:
 Note that the list above reports the objects which are reference counted in all
 ports of wxWidgets; some ports may use this technique also for other classes.
 
+All the objects implement a function IsOk() to test if they are referencing valid
+data; when the objects are in uninitialized state, you can only use the IsOk() getter;
+trying to call any other getter, e.g. wxBrush::GetStyle() on the ::wxNullBrush object,
+will result in an assert failure in debug builds.
+
 
 @section overview_refcount_object Making Your Own Reference Counted Class