rbreslow / speak

A full featured chatbox addon for Garry's Mod.
GNU Affero General Public License v3.0
4 stars 0 forks source link

Improve garbage collection for AvatarSheet #9

Closed rbreslow closed 4 years ago

rbreslow commented 4 years ago

If you switch back and forth between AvatarSheet and ModelSheet, HUDPaint hooks will accumulate.

] lua_run_cl PrintTable(hook.GetTable().HUDPaint)
DrawRecordingIcon   =   function: 0x01a35ad1d0
PlayerOptionDraw    =   function: 0x01a3491b18
speak.HUDPaint  =   function: 0x01a3802228
table: 0x01a3781e40 =   function: 0x01a382ec80
table: 0x01a547b778 =   function: 0x01a52b7098
] lua_run_cl PrintTable(hook.GetTable().HUDPaint)
DrawRecordingIcon   =   function: 0x01a35ad1d0
PlayerOptionDraw    =   function: 0x01a3491b18
speak.HUDPaint  =   function: 0x01a3802228
table: 0x01a3781e40 =   function: 0x01a382ec80
table: 0x01a4ea3428 =   function: 0x01a51224b0
table: 0x01a547b778 =   function: 0x01a52b7098