cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.16k stars 7.05k forks source link

bugfix: memory leak #20720

Open niu2x opened 2 years ago

niu2x commented 2 years ago

i think CommandBufferGL::setVertexBuffer and CommandBufferGL::setIndexBuffer should do same things.

  1. check weather new value is different from old value.
  2. release old value, retain new value.

there's memory leak in CommandBufferGL::setVertexBuffer if not release old value

niu2x commented 2 years ago

checks fail due to: /usr/bin/ld: cannot find -lXxf86vm. it's not my fault...

namka279 commented 3 months ago

20720