lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Really 'delete' what wxMenuBar::Remove() returns?


From: Evgeniy Tarassov
Subject: Re: [lmi] Really 'delete' what wxMenuBar::Remove() returns?
Date: Wed, 30 May 2007 12:41:19 +0200

On 5/29/07, Greg Chicares <address@hidden> wrote:
http://cvs.savannah.gnu.org/viewvc/lmi/lmi/main_wx.cpp?r1=1.74&r2=1.75

I'm troubled by this line that I recently wrote:
  delete menu_bar.Remove(test_menu_index);
To 'delete' anything I didn't create with 'new' myself

This API is really something unusual for WX. I have not realized it
until you have pointed it out.

Would it make sense to add a companion function
wxMenuBar::Destroy(), just as class wxMenu has Destroy()
as well as Remove()?

I don't see no reason not to add such a convenient method. Maybe Vadim does.

I suppose it is not an urgent issue, so unless you instruct me
otherwise I'll wait for Vadim to get back and then prepare a patch for
WX adding such a function.

--
Best wishes,
Evgeniy Tarassov




reply via email to

[Prev in Thread] Current Thread [Next in Thread]