forked from mia/Aegisub
Add a corresponding PopEventHandler call for each PushEventHandler call, this fixes a couple of memory leaks reported by valgrind and msvc.
Originally committed to SVN as r2950.
This commit is contained in:
parent
f1bfb947cf
commit
9891c28977
3 changed files with 14 additions and 0 deletions
|
@ -228,6 +228,10 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE
|
||||||
//////////////
|
//////////////
|
||||||
// Destructor
|
// Destructor
|
||||||
AudioBox::~AudioBox() {
|
AudioBox::~AudioBox() {
|
||||||
|
audioScroll->PopEventHandler(true);
|
||||||
|
HorizontalZoom->PopEventHandler(true);
|
||||||
|
VerticalZoom->PopEventHandler(true);
|
||||||
|
VolumeBar->PopEventHandler(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,15 @@ SubsEditBox::SubsEditBox (wxWindow *parent,SubtitlesGrid *gridp) : wxPanel(paren
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//////////////
|
||||||
|
// Destructor
|
||||||
|
SubsEditBox::~SubsEditBox() {
|
||||||
|
ActorBox->PopEventHandler(true);
|
||||||
|
Effect->PopEventHandler(true);
|
||||||
|
TextEdit->PopEventHandler(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
// Set split or single line mode
|
// Set split or single line mode
|
||||||
void SubsEditBox::SetSplitLineMode(wxSize newSize) {
|
void SubsEditBox::SetSplitLineMode(wxSize newSize) {
|
||||||
|
|
|
@ -149,6 +149,7 @@ public:
|
||||||
SubsTextEditCtrl *TextEdit;
|
SubsTextEditCtrl *TextEdit;
|
||||||
|
|
||||||
SubsEditBox(wxWindow *parent,SubtitlesGrid *gridp);
|
SubsEditBox(wxWindow *parent,SubtitlesGrid *gridp);
|
||||||
|
~SubsEditBox();
|
||||||
|
|
||||||
void SetOverride (wxString tag,wxString preValue=_T(""),int pos=-1,bool getFocus=true);
|
void SetOverride (wxString tag,wxString preValue=_T(""),int pos=-1,bool getFocus=true);
|
||||||
void SetStyleFlag (wxString tag,wxString preValue=_T(""),int pos=-1);
|
void SetStyleFlag (wxString tag,wxString preValue=_T(""),int pos=-1);
|
||||||
|
|
Loading…
Reference in a new issue