mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
Many tweaks to stream memory allocation, including but not limited to streams now are shared_ptrs.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "timer.h"
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include <memory>
|
||||
|
||||
#define STREAM_IDENT_WAIT_MS 10000
|
||||
|
||||
@@ -21,7 +22,7 @@ public:
|
||||
|
||||
//main processing interface
|
||||
void Process();
|
||||
void AddStream(EQStream *& eqs);
|
||||
void AddStream(std::shared_ptr<EQStream> &eqs);
|
||||
EQStreamInterface *PopIdentified();
|
||||
|
||||
protected:
|
||||
@@ -39,11 +40,11 @@ protected:
|
||||
//pending streams..
|
||||
class Record {
|
||||
public:
|
||||
Record(EQStream *s);
|
||||
EQStream *stream; //we own this
|
||||
Record(std::shared_ptr<EQStream> s);
|
||||
std::shared_ptr<EQStream> stream; //we own this
|
||||
Timer expire;
|
||||
};
|
||||
std::vector<Record *> m_streams; //we own these objects, and the streams contained in them.
|
||||
std::vector<Record> m_streams; //we own these objects, and the streams contained in them.
|
||||
std::queue<EQStreamInterface *> m_identified; //we own these objects
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user