mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Playlists: fix resource/memory leak
Remove workaround that was implemented to counter a crash during the beginning of this project, this issue was long solved but the workaround was never removed. Clearing the last precached VPK name prevents the engine from helping other threads to properly unload existing handles, if at all.
This commit is contained in:
parent
c9a9b01bf2
commit
c9b80a70cd
@ -70,7 +70,7 @@ void CServerListManager::LaunchServer(const bool bChangeLevel) const
|
|||||||
m_Server.m_svHostName.c_str(), m_Server.m_svHostMap.c_str(), m_Server.m_svPlaylist.c_str());
|
m_Server.m_svHostName.c_str(), m_Server.m_svHostMap.c_str(), m_Server.m_svPlaylist.c_str());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Playlist gets parsed in two instances, first in KeyValues::ParsePlaylists with all the necessary
|
* Playlist gets parsed in two instances, first in Playlists_Parse() with all the necessary
|
||||||
* values. Then when you would normally call launchplaylist which calls StartPlaylist it would cmd
|
* values. Then when you would normally call launchplaylist which calls StartPlaylist it would cmd
|
||||||
* call mp_gamemode which parses the gamemode specific part of the playlist..
|
* call mp_gamemode which parses the gamemode specific part of the playlist..
|
||||||
*/
|
*/
|
||||||
|
@ -53,8 +53,6 @@ bool Playlists_Load(const char* pszPlaylist)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool Playlists_Parse(const char* pszPlaylist)
|
bool Playlists_Parse(const char* pszPlaylist)
|
||||||
{
|
{
|
||||||
g_szMTVFItemName[0] = '\0'; // Terminate g_szMTVFTaskName to prevent crash while loading playlist.
|
|
||||||
|
|
||||||
CHAR sPlaylistPath[] = "\x77\x27\x35\x2b\x2c\x6c\x2b\x2c\x2b";
|
CHAR sPlaylistPath[] = "\x77\x27\x35\x2b\x2c\x6c\x2b\x2c\x2b";
|
||||||
PCHAR curr = sPlaylistPath;
|
PCHAR curr = sPlaylistPath;
|
||||||
while (*curr)
|
while (*curr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user