mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-30 03:15:38 -05:00
fix multiple weak refs causing a memory leak
This commit is contained in:
parent
e92541a655
commit
0e4636284b
1 changed files with 1 additions and 1 deletions
|
@ -253,7 +253,7 @@ bool WeakRefPool::isManaged(CCObject* obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WeakRefPool::manage(CCObject* obj) {
|
void WeakRefPool::manage(CCObject* obj) {
|
||||||
if (obj) {
|
if (obj && !m_pool.contains(obj)) {
|
||||||
obj->retain();
|
obj->retain();
|
||||||
m_pool.insert(obj);
|
m_pool.insert(obj);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue