mirror of https://github.com/odrling/Aegisub
Delete built in export filters on exit
Originally committed to SVN as r5474.
This commit is contained in:
parent
faecc3304d
commit
be8d841577
|
@ -42,6 +42,7 @@
|
|||
|
||||
#include "ass_export_filter.h"
|
||||
#include "ass_file.h"
|
||||
#include "utils.h"
|
||||
|
||||
AssExportFilter::AssExportFilter(wxString const& name, wxString const& description, int priority)
|
||||
: name(name)
|
||||
|
@ -93,3 +94,7 @@ FilterList *AssExportFilterChain::GetFilterList() {
|
|||
static FilterList instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void AssExportFilterChain::Clear() {
|
||||
delete_clear(*GetFilterList());
|
||||
}
|
||||
|
|
|
@ -60,17 +60,15 @@ typedef std::list<AssExportFilter*> FilterList;
|
|||
class AssExportFilterChain {
|
||||
friend class AssExporter;
|
||||
|
||||
/// The list of registered filters
|
||||
FilterList Filters;
|
||||
|
||||
/// Get the singleton instance
|
||||
static FilterList *GetFilterList();
|
||||
AssExportFilterChain() { }
|
||||
public:
|
||||
/// Register an export filter
|
||||
static void Register(AssExportFilter *filter);
|
||||
/// Unregister an export filter; must have been registered
|
||||
static void Unregister(AssExportFilter *filter);
|
||||
/// Unregister and delete all export filters
|
||||
static void Clear();
|
||||
};
|
||||
|
||||
/// DOCME
|
||||
|
|
|
@ -339,6 +339,9 @@ int AegisubApp::OnExit() {
|
|||
#ifdef WITH_AUTOMATION
|
||||
delete global_scripts;
|
||||
#endif
|
||||
|
||||
AssExportFilterChain::Clear();
|
||||
|
||||
#ifdef _DEBUG
|
||||
delete emit_stdout;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue