Application: on exit, clear Application.current if it is equal to this
This matches setting Application.current in the constructor, and helps avoid memory leaks
This commit is contained in:
@@ -591,6 +591,10 @@ class Application extends Module
|
|||||||
@:noCompletion private function __onModuleExit(code:Int):Void
|
@:noCompletion private function __onModuleExit(code:Int):Void
|
||||||
{
|
{
|
||||||
__backend.exit();
|
__backend.exit();
|
||||||
|
if (Application.current == this)
|
||||||
|
{
|
||||||
|
Application.current = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@:noCompletion private function __onWindowClose(window:Window):Void
|
@:noCompletion private function __onWindowClose(window:Window):Void
|
||||||
|
|||||||
Reference in New Issue
Block a user