diff --git a/connection.h b/connection.h index c62d1dd..9846a9f 100644 --- a/connection.h +++ b/connection.h @@ -252,7 +252,7 @@ struct stat_t }; -struct conn_info_t //stores info for a raw connection.for client ,there is only one connection,for server there can be thousand of connection since server can +struct conn_info_t:not_copy_able_t //stores info for a raw connection.for client ,there is only one connection,for server there can be thousand of connection since server can //handle multiple clients { union tmp_union_t @@ -325,10 +325,11 @@ struct conn_info_t //stores info for a raw connection.for client ,there is o { last_active_time=get_current_time(); } + /* conn_info_t(const conn_info_t &b) { assert(0==1); - } + }*/ }; /* struct conn_manager_t //manager for connections. for client,we dont need conn_manager since there is only one connection.for server we use one conn_manager for all connections diff --git a/fec_manager.h b/fec_manager.h index 3f191e6..74eb3c9 100644 --- a/fec_manager.h +++ b/fec_manager.h @@ -291,7 +291,7 @@ struct blob_decode_t int output(int &n,char ** &output,int *&len_arr); }; -class fec_encode_manager_t +class fec_encode_manager_t:not_copy_able_t { private: @@ -422,10 +422,10 @@ struct fec_group_t //int data_counter=0; map group_mp; }; -class fec_decode_manager_t +class fec_decode_manager_t:not_copy_able_t { anti_replay_t anti_replay; - fec_data_t *fec_data; + fec_data_t *fec_data=0; unordered_map mp; blob_decode_t blob_decode; @@ -443,15 +443,22 @@ public: fec_decode_manager_t() { fec_data=new fec_data_t[fec_buff_num+5]; + assert(fec_data!=0); clear(); } + /* fec_decode_manager_t(const fec_decode_manager_t &b) { assert(0==1);//not allowed to copy - } + }*/ ~fec_decode_manager_t() { - delete fec_data; + mylog(log_debug,"fec_decode_manager destroyed\n"); + if(fec_data!=0) + { + mylog(log_debug,"fec_data freed\n"); + delete fec_data; + } } int clear() {