Use shared_ptr for CProtocolMessage.