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