mirror of https://github.com/axmolengine/axmol.git
Should set _mtlCommandBuffer to nil after release
This commit is contained in:
parent
047bcae9ea
commit
36c25dc889
|
@ -1,5 +1,6 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2018-2019 Xiamen Yaji Software Co., Ltd.
|
||||
Copyright (c) 2020 c4games.com
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
|
@ -370,6 +371,8 @@ void CommandBufferMTL::endFrame()
|
|||
|
||||
[_mtlCommandBuffer commit];
|
||||
[_mtlCommandBuffer release];
|
||||
_mtlCommandBuffer = nil;
|
||||
|
||||
DeviceMTL::resetCurrentDrawable();
|
||||
[_autoReleasePool drain];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue