Merge pull request #13701 from seivan/patch-3

Don't call release() before retain() #13656
This commit is contained in:
子龙山人 2015-09-15 11:28:56 +08:00
commit 02eca21b78
1 changed files with 1 additions and 2 deletions

View File

@ -274,9 +274,9 @@ public:
void insert(const K& key, V object)
{
CCASSERT(object != nullptr, "Object is nullptr!");
object->retain();
erase(key);
_data.insert(std::make_pair(key, object));
object->retain();
}
/**
@ -308,7 +308,6 @@ public:
_data.erase(iter);
return 1;
}
return 0;
}