diff --git a/src/network/compressor.h b/src/network/compressor.h index dd2da6d..26b2cd6 100644 --- a/src/network/compressor.h +++ b/src/network/compressor.h @@ -40,11 +40,11 @@ namespace Network { private: static const int BUFFER_SIZE = 2048 * 2048; /* effective limit on terminal size */ - unsigned char *buffer; + unsigned char buffer[BUFFER_SIZE]; public: - Compressor() : buffer( NULL ) { buffer = new unsigned char[ BUFFER_SIZE ]; } - ~Compressor() { if ( buffer ) { delete[] buffer; } } + Compressor() {} + ~Compressor() {} std::string compress_str( const std::string &input ); std::string uncompress_str( const std::string &input );