blender/intern/ghost
Kévin Dietrich 3e35e32e9d Fix memory leak in GHOST Event Manager.
The events are allocated on the heap, then pushed on a stack. Before
being processed, they are popped from the stack, and deleted after
processing is done. When the manager is destroyed (e.g. application
closing), any remaining event in the stack is detroyed.

Issue is that when the "application closing" event is processed, it is
never freed, because the manager gets destroyed before the call to
`delete` is made and the event is not on the stack anymore.

Now events are left on the stack while they are processed, and only
popped and deleted after processing is done.

As a slight bonus refactor: use void as return type for dispatch events
functions, as no caller is checking the return value, and it is not
clear what it means (suggested by the reviewer).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1695
2015-12-27 18:08:44 +01:00
..
doc This commit fixes up a bunch of svn properties to hopefully make things a little nicer for everyone. 2007-08-28 10:07:08 +00:00
intern Fix memory leak in GHOST Event Manager. 2015-12-27 18:08:44 +01:00
test Revert "Increase CMake minimum version to 3.0" 2015-11-10 02:53:10 +11:00
CMakeLists.txt GHOST: rename suffix X11 to Unix for non X11 files 2015-11-16 21:57:05 +11:00
GHOST_C-api.h Fix memory leak in GHOST Event Manager. 2015-12-27 18:08:44 +01:00
GHOST_IEvent.h code clenup: comments and some style edits on ghost/osx (odd indentation) 2012-09-06 02:10:09 +00:00
GHOST_IEventConsumer.h style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
GHOST_ISystem.h Fix memory leak in GHOST Event Manager. 2015-12-27 18:08:44 +01:00
GHOST_ISystemPaths.h code clenup: comments and some style edits on ghost/osx (odd indentation) 2012-09-06 02:10:09 +00:00
GHOST_ITimerTask.h Cleanup: doxygen comments 2015-07-01 16:30:26 +10:00
GHOST_IWindow.h Cleanup: doxygen comments 2015-07-01 16:30:26 +10:00
GHOST_Path-api.h code clenup: comments and some style edits on ghost/osx (odd indentation) 2012-09-06 02:10:09 +00:00
GHOST_Rect.h Comments 2014-08-16 10:51:07 +10:00
GHOST_Types.h Error out on Windows if driver does not support OpenGL 2.1 with an error 2015-11-22 20:53:57 +01:00
SConscript GHOST: rename suffix X11 to Unix for non X11 files 2015-11-16 21:57:05 +11:00