diff --git a/cocos/deprecated/CCArray.cpp b/cocos/deprecated/CCArray.cpp index 15e7cec104..2f394bdd49 100644 --- a/cocos/deprecated/CCArray.cpp +++ b/cocos/deprecated/CCArray.cpp @@ -695,7 +695,7 @@ void __Array::exchangeObjectAtIndex(ssize_t index1, ssize_t index2) void __Array::replaceObjectAtIndex(ssize_t index, Ref* object, bool releaseObject/* = true*/) { ccArrayInsertObjectAtIndex(data, object, index); - ccArrayRemoveObjectAtIndex(data, index + 1); + ccArrayRemoveObjectAtIndex(data, index + 1, releaseObject); } void __Array::reverseObjects()