CacheFile: make sure SpinLock is destroyed when exiting Blender.

Missed in rB62b1cdd6.
This commit is contained in:
Kévin Dietrich 2016-09-19 09:02:31 +02:00 committed by Sergey Sharybin
parent c8c829360b
commit 1782263ef8
3 changed files with 8 additions and 0 deletions

View File

@ -39,6 +39,7 @@ struct Main;
struct Scene;
void BKE_cachefiles_init(void);
void BKE_cachefiles_exit(void);
void *BKE_cachefile_add(struct Main *bmain, const char *name);

View File

@ -49,6 +49,7 @@
#include "BKE_blender_version.h" /* own include */
#include "BKE_blendfile.h"
#include "BKE_brush.h"
#include "BKE_cachefile.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
@ -84,6 +85,7 @@ void BKE_blender_free(void)
BKE_spacetypes_free(); /* after free main, it uses space callbacks */
IMB_exit();
BKE_cachefiles_exit();
BKE_images_exit();
DAG_exit();

View File

@ -56,6 +56,11 @@ void BKE_cachefiles_init(void)
BLI_spin_init(&spin);
}
void BKE_cachefiles_exit(void)
{
BLI_spin_end(&spin);
}
void *BKE_cachefile_add(Main *bmain, const char *name)
{
CacheFile *cache_file = BKE_libblock_alloc(bmain, ID_CF, name);