Need to free the Pconn hash table properly.
constructor/desctructor are both required.
for (i = 0; i < PCONN_HIST_SZ; i++)
hist[i] = 0;
- PconnModule::GetInstance()->add
- (this);
+ PconnModule::GetInstance()->add(this);
+}
+
+PconnPool::~PconnPool()
+{
+ descr = NULL;
+ hashFreeMemory(table);
}
void
PconnPool::push(int fd, const char *host, u_short port, const char *domain, struct IN_ADDR *client_address)
{
-
IdleConnList *list;
const char *aKey;
LOCAL_ARRAY(char, desc, FD_DESC_SZ);
public:
PconnPool(const char *);
+ ~PconnPool();
void moduleInit();
void push(int fd, const char *host, u_short port, const char *domain, struct IN_ADDR *client_address);