]> git.lizzy.rs Git - dragonfireclient.git/commit
Global new() or grab() to be managed in constuctor only (#7235 partial) (#7236)
authorJDCodeIt <JDCodeIt@users.noreply.github.com>
Mon, 30 Apr 2018 17:14:28 +0000 (11:14 -0600)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Mon, 30 Apr 2018 17:14:28 +0000 (19:14 +0200)
commit5862d9e482f9b263df2a01ef6f5c4c5bcbef91bd
tree6bcef6562aa4c19046551a224faa0e07dd490722
parentba91624d8c354bac49c35a449029b6712022d0cb
Global new() or grab() to be managed in constuctor only (#7235 partial) (#7236)

* g_extrusion_mesh_cache new() and grab() to be managed in constuctor only (#7235 partial)

This global was getting grab()-ed by each call to getItemMesh, incrementing its reference count. What was to be the final drop() in the destructor ended up with > 0 reference count, so memory not freed by Irrlicht.
src/wieldmesh.cpp