Skip to content

Commit

Permalink
memory leak fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kraynyukhov committed Jun 28, 2019
1 parent a140bf2 commit a9997bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/WSClientsPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef __WSCLIENTSPOOL_H__
# define __WSCLIENTSPOOL_H__

#include <map>
#include <ext/tsl/robin_map.h>
#include <memory>
#include <string>

Expand All @@ -37,7 +37,7 @@ namespace LAppS
{
private:
ePoll mEPoll;
std::map<int32_t,ClientWebSocketSPtr> mPool;
tsl::robin_map<int32_t,ClientWebSocketSPtr> mPool;

public:
explicit WSClientPool():mEPoll(), mPool() {}
Expand All @@ -59,7 +59,7 @@ namespace LAppS

void remove(const int32_t idx)
{
auto it=mPool.begin();
auto it=mPool.find(idx);
if(it != mPool.end())
mPool.erase(it);
}
Expand Down

0 comments on commit a9997bf

Please # to comment.