From: Václav Slavík Date: Thu, 6 May 2010 05:42:52 +0000 (+0000) Subject: Use wxCHECKED_DELETE in wxScopedPtr. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4e0c592f98541952291b5da3add924f6ce4dd1b6 Use wxCHECKED_DELETE in wxScopedPtr. It was only used in macros-based implementation, use it in the template version too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/scopedptr.h b/include/wx/scopedptr.h index 515c7fc383..bfe98de16e 100644 --- a/include/wx/scopedptr.h +++ b/include/wx/scopedptr.h @@ -43,7 +43,7 @@ public: wxEXPLICIT wxScopedPtr(T * ptr = NULL) : m_ptr(ptr) { } - ~wxScopedPtr() { delete m_ptr; } + ~wxScopedPtr() { wxCHECKED_DELETE(m_ptr); } // test for pointer validity: defining conversion to unspecified_bool_type // and not more obvious bool to avoid implicit conversions to integer types