Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reference counting in HLodClass::Remove_Sub_Object #1140

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

xezon
Copy link
Contributor

@xezon xezon commented Aug 11, 2024

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 xezon added the fixing label Aug 11, 2024
@jonwil
Copy link
Contributor

jonwil commented Aug 11, 2024

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

@xezon
Copy link
Contributor Author

xezon commented Aug 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants