diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-11 01:17:46 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-11 01:17:46 +0400 |
commit | 3627541894e2875b74d974abfe9ead60b68c4d05 (patch) | |
tree | b4b24fc9e43b6873ea60ff1acc4793847a118d29 /source/blender/blenkernel/intern | |
parent | 4c136881a5a17f411ea05588ee86479f94cc2429 (diff) |
BGE: Fixing the memory leaks reported when the BlenderPlayer exits.
They were caused by not having a free_windowmanager_cb set and by not having registered SpaceTypes, which meant data allocated for thosse SpaceTypes could not be freed. These were solved by defining a free_windowmanager_cb for the player that just frees wmWindows, and by making sure we only allocate memory for registered SpaceTypes.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 01f57b95378..fe2f52d79fd 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -136,6 +136,11 @@ void BKE_spacetype_register(SpaceType *st) BLI_addtail(&spacetypes, st); } +int BKE_spacetype_exists(int spaceid) +{ + return BKE_spacetype_from_id(spaceid) != NULL; +} + /* ***************** Space handling ********************** */ void BKE_spacedata_freelist(ListBase *lb) |