We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
CCTextureAtlas::initWithTexture() may cause memory leak
CCTextureAtlas::initWithTexture() may cause memory leak
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset commit:7cd52b11452e99982379a142dd9dad771b9b7922.
- Status changed from Resolved to Closed
- Project changed from cocos2d-x to cpp
- Category deleted (
5) - Target version deleted (
cocos2d-0.99.5-x-0.8.3)
Pokerstar88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya
OK, I’ve updated the announcement and added a link to zipball on google code. Thank you for reminding me.
Agen Indonesia | Agen Bola | Poker Indonesia
Pokerstar88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya
OK, I’ve updated the announcement and added a link to zipball on google code. Thank you for reminding me.
Agen Indonesia | Agen Bola | Poker Indonesia
The optimization introduces a bug where the priority and Touch Mode will not get changed if the list is locked.
The most straight forward fix is to merge the pHandlersToAdd and pHandlersToRemove into a queue and process through all of them in the order they are received
Pokerstar88.com Agen Texas Poker dan Domino Online Indonesia Terpercaya | Agen Bola | Taruhan Bola | Agen Bola | Olb365.com Agen Judi Bola Online, Agen Judi Casino Online Indonesia Terpercaya | Jasa SEO | Agen Sbobet
Status: | Closed | |
---|---|---|
Start date: | 2011-05-06 | |
Priority: | Normal | |
Due date: | ||
Assignee: | zhangxm | |
% Done: | 100% |
|
Category: | - | |
Target version: | - |
bool CCTextureAtlas::initWithTexture(CCTexture2D texture, unsigned int capacity)
{
assert;
m_uCapacity = capacity;
m_uTotalQuads = 0;
// retained in property
this->m_pTexture = texture;
CC_SAFE_RETAIN;
m_pQuads = calloc m_uCapacity, 1 );
m_pIndices = (GLushort )calloc m_uCapacity * 6, 1 );
if( ! ( m_pQuads && m_pIndices) ) {
//CCLOG(“cocos2d: CCTextureAtlas: not enough memory”);
CC_SAFE_FREE(m_pQuads)
CC_SAFE_FREE(m_pIndices)
return false;
}
When the condition in if sentence is true, should release the texture. Because the destructure will release it, so should use CC_SAFE_RELEASE_NULL() to release it.