Thyme icon indicating copy to clipboard operation
Thyme copied to clipboard

Fix reference counting in HLodClass::Remove_Sub_Object

Open xezon opened this issue 1 year ago • 2 comments

Original call to single Release_Ref looks wrong to me, because m_lod[i][j].m_model and m_additionalModels[i].m_model are individually ref counted. So this looks like it would leak.

xezon avatar Aug 11 '24 08:08 xezon

I verified this against original and the code we have right now is correct to the original (i.e. the subobj->Release_Ref(); line)

jonwil avatar Aug 11 '24 08:08 jonwil

Ok. Then perhaps this is original game bug. It would only lead to memory leak, not corruption, so it is not critical problem.

xezon avatar Aug 11 '24 09:08 xezon