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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruins of Ahn'Quiraj memory leak fix #547

Closed
wants to merge 2 commits into from

Conversation

Vigerus
Copy link
Contributor

@Vigerus Vigerus commented Apr 5, 2024

馃嵃 Pullrequest

With each Ossirian attempt the instance map is filled with new spawned crystals, that never get removed from there (only if we instance is unloaded i guess)

Proof

ticket on discord

Issues

  • fixes #Ruins of Ahnquiraj memory leak

How2Test

  • Start the instance presumably with bots, go to ossirian, have couple tries on him and just attach with VS and watch the m_goEntryGuidCollection of instance_ruins_of_ahnqiraj

Todo / Checklist

  • None

@insunaa
Copy link
Contributor

insunaa commented Apr 6, 2024

I'm not sure your code does what you think it does.

m_goEntryGuidCollection may be growing larger because of dynguids, but it's only a collection of ObjectGuids, so even if the collection is only cleared on instance unload it shouldn't matter.
In the non-dynguid case the newly spawned GObs inherit the ObjectGuid of the GOb that was in the same place before this, unless of course they really are wild GObs. In that case however you should still not remove every single crystal from the collection upon object destruction, you should at most remove the currently destroyed object, I think.

@Vigerus
Copy link
Contributor Author

Vigerus commented Apr 6, 2024

I'm not sure your code does what you think it does.

m_goEntryGuidCollection may be growing larger because of dynguids, but it's only a collection of ObjectGuids, so even if the collection is only cleared on instance unload it shouldn't matter. In the non-dynguid case the newly spawned GObs inherit the ObjectGuid of the GOb that was in the same place before this, unless of course they really are wild GObs. In that case however you should still not remove every single crystal from the collection upon object destruction, you should at most remove the currently destroyed object, I think.

Yeah, my bad, it should be a double search, update inc.

@killerwife killerwife closed this in 10b7680 Apr 6, 2024
killerwife added a commit to cmangos/mangos-tbc that referenced this pull request May 5, 2024
killerwife added a commit to cmangos/mangos-wotlk that referenced this pull request May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants