mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Patch for:
-Perl blessing of exported variables is causing the SVs to be overwritten but never freed by the Perl GC. I'm not sure if this is a feature or a bug in Perl as the documentation sucks. Addressed by setting the blessed SVs in question to be undefined at the end of every script. Caused a noticeable drop in memory for zones with a lot of quest events firing but it's probably not perfect.
This commit is contained in:
parent
fb0add070b
commit
757fc01b78
@ -158,6 +158,14 @@ void PerlXSParser::SendCommands(const char * pkgprefix, const char *event, uint3
|
|||||||
//now call the requested sub
|
//now call the requested sub
|
||||||
perl->dosub(std::string(pkgprefix).append("::").append(event).c_str());
|
perl->dosub(std::string(pkgprefix).append("::").append(event).c_str());
|
||||||
|
|
||||||
|
#ifdef EMBPERL_XS_CLASSES
|
||||||
|
std::string eval_str = (std::string)"$" + (std::string)pkgprefix + (std::string)"::client = undef;";
|
||||||
|
eval_str += (std::string)"$" + (std::string)pkgprefix + (std::string)"::npc = undef;";
|
||||||
|
eval_str += (std::string)"$" + (std::string)pkgprefix + (std::string)"::questitem = undef;";
|
||||||
|
eval_str += (std::string)"$" + (std::string)pkgprefix + (std::string)"::entity_list = undef;";
|
||||||
|
perl->eval(eval_str.c_str());
|
||||||
|
#endif
|
||||||
|
|
||||||
} catch(const char * err) {
|
} catch(const char * err) {
|
||||||
|
|
||||||
//try to reduce some of the console spam...
|
//try to reduce some of the console spam...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user