set safebuf::m_buf to null in destructor