RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.37k stars 244 forks source link

Free idLobby memory inside destructor #847

Closed reeFridge closed 3 months ago

reeFridge commented 3 months ago

fixes #846

Freeing idLobby memory inside idLobby::Shutdown causes Segfault on sending snapshots to the clients.

I have moved Mem_Free calls inside idLobby::~idLobby so memory will be properly freed at shutdown.

reeFridge commented 3 months ago

To be honest, I am not so confident about where idLobby memory should be freed, so any opinion about that is appreciated.

My point is if idSessionLocal calls idLobby::Initialize that allocs memory, freeing that memory is also his responsibility.

RobertBeckebans commented 3 months ago

Thank you for your PR. I will look into this issue at the weekend.

RobertBeckebans commented 3 months ago

I close this because the PR #848 by @SRSaunders already fixes it and it has been merged into master.