mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13701 from seivan/patch-3
Don't call release() before retain() #13656
This commit is contained in:
commit
02eca21b78
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue