Fixed a memory leak
This commit is contained in:
parent
9eee9ccdf9
commit
7a315a303c
|
@ -2986,7 +2986,7 @@ void MyFrame::OnOpen ( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileDialog *fd = new wxFileDialog (
|
wxFileDialog fd (
|
||||||
this,
|
this,
|
||||||
( largeFile ) ? _ ( "Open Large Document" ) : _ ( "Open" ),
|
( largeFile ) ? _ ( "Open Large Document" ) : _ ( "Open" ),
|
||||||
defaultDir,
|
defaultDir,
|
||||||
|
@ -3000,11 +3000,11 @@ void MyFrame::OnOpen ( wxCommandEvent& event )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if ( fd->ShowModal() == wxID_CANCEL )
|
if ( fd.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxArrayString paths;
|
wxArrayString paths;
|
||||||
fd->GetPaths ( paths );
|
fd.GetPaths ( paths );
|
||||||
size_t count = paths.Count();
|
size_t count = paths.Count();
|
||||||
if ( !count )
|
if ( !count )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue