mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 07:16:37 +00:00
Many tweaks to stream memory allocation, including but not limited to streams now are shared_ptrs.
This commit is contained in:
@@ -102,6 +102,7 @@ Client::~Client() {
|
||||
//let the stream factory know were done with this stream
|
||||
eqs->Close();
|
||||
eqs->ReleaseFromUse();
|
||||
safe_delete(eqs);
|
||||
}
|
||||
|
||||
void Client::SendLogServer()
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ private:
|
||||
bool HandleDeleteCharacterPacket(const EQApplicationPacket *app);
|
||||
bool HandleZoneChangePacket(const EQApplicationPacket *app);
|
||||
|
||||
EQStreamInterface* const eqs;
|
||||
EQStreamInterface* eqs;
|
||||
};
|
||||
|
||||
bool CheckCharCreateInfoSoF(CharCreate_Struct *cc);
|
||||
|
||||
+3
-1
@@ -394,7 +394,7 @@ int main(int argc, char** argv) {
|
||||
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
|
||||
InterserverTimer.Trigger();
|
||||
uint8 ReconnectCounter = 100;
|
||||
EQStream* eqs;
|
||||
std::shared_ptr<EQStream> eqs;
|
||||
EmuTCPConnection* tcpc;
|
||||
EQStreamInterface *eqsi;
|
||||
|
||||
@@ -412,6 +412,8 @@ int main(int argc, char** argv) {
|
||||
stream_identifier.AddStream(eqs); //takes the stream
|
||||
}
|
||||
|
||||
eqs = nullptr;
|
||||
|
||||
//give the stream identifier a chance to do its work....
|
||||
stream_identifier.Process();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user