Use wxScopedPtr<> instead of explicit calls to "delete"

No real changes, but the code is a bit safer and hopefully more clear.
This commit is contained in:
Vadim Zeitlin
2020-08-14 19:41:53 +02:00
parent c70a8261cb
commit cdd68da370
3 changed files with 25 additions and 28 deletions

View File

@@ -59,10 +59,14 @@ public:
void Destroy();
protected:
// Note: only one of the following functions should be overridden, if both
// of them are, GetPopupMenu() has the priority, i.e. CreatePopupMenu()
// won't be called if GetPopupMenu() returns a non-null pointer.
// creates menu to be displayed when user clicks on the icon
virtual wxMenu *CreatePopupMenu() { return NULL; }
// same as CreatePopupMenu but won't destroy the menu
// same as CreatePopupMenu but the returned menu won't be destroyed
virtual wxMenu *GetPopupMenu() { return NULL; }
private: