]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
Check for fdopen. Probably everywhere has it, but check until we are sure.
[wxWidgets.git] / include / wx / object.h
index 0123f40fb6c04aceea4963eed834972a9211d9e0..dfb88a48c62f946e4c7fe80caeeb14b8b0483669 100644 (file)
@@ -17,7 +17,6 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#include "wx/defs.h"
 #include "wx/memory.h"
 
 class WXDLLIMPEXP_BASE wxObject;
@@ -471,13 +470,16 @@ public:
     // destroy a reference
     void UnRef();
 
+    // Make sure this object has only one reference
+    void UnShare() { AllocExclusive(); }
+
 protected:
     // ensure that our data is not shared with anybody else: if we have no
     // data, it is created using CreateRefData() below, if we have shared data
     // it is copied using CloneRefData(), otherwise nothing is done
     void AllocExclusive();
 
-    // both methods must be implemented if Unshare() is used, not pure virtual
+    // both methods must be implemented if AllocExclusive() is used, not pure virtual
     // only because of the backwards compatibility reasons
 
     // create a new m_refData
@@ -501,7 +503,7 @@ class WXDLLIMPEXP_BASE wxDynamicObject : public wxObject
 public:
     // instantiates this object with an instance of its superclass
     wxDynamicObject(wxObject* superClassInstance, const wxDynamicClassInfo *info) ;
-    ~wxDynamicObject();
+    virtual ~wxDynamicObject();
 
     void SetProperty (const wxChar *propertyName, const wxxVariant &value);
     wxxVariant GetProperty (const wxChar *propertyName) const ;