Make wxRefCounter non copyable.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Dec 2010 18:43:49 +0000 (18:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Dec 2010 18:43:49 +0000 (18:43 +0000)
commitfd08ccd2466e64d5de0ab2a8aaa4455a74fe9eb0
tree015d7164efab4c820f58d9078154f803da27eea1
parentf9b4d680d72930c31fe14dd63421a85d97ccd739
Make wxRefCounter non copyable.

wxRefCounter copy ctor was wrong as the new object had the same reference
count as the old one instead of starting its life with reference count set to
1 as any new object should.

While we could fix its copy ctor, it seems to be better to forbid copying
wxRefCounter objects at all because the semantics of doing this is not obvious
and the compiler-generated copy ctor in the derived classes often doesn't do
what the code using it expects it to do, as was discovered by making
wxRefCounter non copyable: see the fixes in the previous commits.

To uncover all such bugs, make wxRefCounter and classes deriving from it non
copyable. If this uncovers more problems, they should be fixed by implementing
copying properly (and explicitly) in the derived classes.

Closes #12768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/gdiobj.h
include/wx/msw/gdiimage.h
include/wx/object.h
src/common/iconbndl.cpp