Fixed some memory leaks in the kanji timer

Originally committed to SVN as r2965.
This commit is contained in:
harukalover 2009-05-21 22:57:43 +00:00
parent ecc4b618b3
commit b4a5032b2e
2 changed files with 9 additions and 0 deletions

View file

@ -169,6 +169,14 @@ DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid)
} }
//////////////
// Destructor
DialogKanjiTimer::~DialogKanjiTimer() {
SourceText->PopEventHandler(true);
DestText->PopEventHandler(true);
}
/////////////// ///////////////
// Event table // Event table
BEGIN_EVENT_TABLE(DialogKanjiTimer,wxDialog) BEGIN_EVENT_TABLE(DialogKanjiTimer,wxDialog)

View file

@ -91,6 +91,7 @@ private:
public: public:
DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *grid); DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *grid);
~DialogKanjiTimer();
void OnKeyDown(wxKeyEvent &event); void OnKeyDown(wxKeyEvent &event);
inline void OnMouseEvent(wxMouseEvent &event); inline void OnMouseEvent(wxMouseEvent &event);
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()