mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 04:02:34 +03:00
Clean up after content factory
svn path=/trunk/netsurf/; revision=12415
This commit is contained in:
parent
955896ac46
commit
b92ca9cd30
@ -44,6 +44,24 @@ typedef struct content_handler_entry {
|
||||
|
||||
static content_handler_entry *content_handlers;
|
||||
|
||||
/**
|
||||
* Clean up after the content factory
|
||||
*/
|
||||
void content_factory_fini(void)
|
||||
{
|
||||
content_handler_entry *victim;
|
||||
|
||||
while (content_handlers != NULL) {
|
||||
victim = content_handlers;
|
||||
|
||||
content_handlers = content_handlers->next;
|
||||
|
||||
lwc_string_unref(victim->mime_type);
|
||||
|
||||
free(victim);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a handler with the content factory
|
||||
*
|
||||
|
@ -31,6 +31,8 @@ struct llcache_handle;
|
||||
|
||||
typedef struct content_handler content_handler;
|
||||
|
||||
void content_factory_fini(void);
|
||||
|
||||
nserror content_factory_register_handler(lwc_string *mime_type,
|
||||
const content_handler *handler);
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include "utils/config.h"
|
||||
#include "utils/utsname.h"
|
||||
#include "content/content_factory.h"
|
||||
#include "content/fetch.h"
|
||||
#include "content/hlcache.h"
|
||||
#include "content/urldb.h"
|
||||
@ -214,6 +215,8 @@ void netsurf_exit(void)
|
||||
html_fini();
|
||||
css_fini();
|
||||
|
||||
content_factory_fini();
|
||||
|
||||
LOG(("Closing utf8"));
|
||||
utf8_finalise();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user