Merge pull request #15546 from minggo/issue_15526

fix memory leak
This commit is contained in:
minggo 2016-05-03 14:02:38 +08:00
commit f2e5eb332a
1 changed files with 3 additions and 0 deletions

View File

@ -290,6 +290,9 @@ Node* ClippingNode::getStencil() const
void ClippingNode::setStencil(Node *stencil)
{
if (_stencil == stencil)
return;
#if CC_ENABLE_GC_FOR_NATIVE_OBJECTS
auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine();
if (sEngine)