From 6797fcb1d33e823a7336d50fdb529820aa4d2a84 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 8 Dec 2011 23:07:47 +0100 Subject: [PATCH] MemBufs don't need explicit cleanup anymore in HttpBody --- src/HttpBody.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/HttpBody.cc b/src/HttpBody.cc index 6cef876ac4..110d282d56 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -43,22 +43,19 @@ HttpBody::HttpBody() : mb(new MemBuf) HttpBody::~HttpBody() { - clear(); delete mb; } void HttpBody::clear() { - if (!mb->isNull()) - mb->clean(); + mb->clean(); } /* set body by absorbing mb */ void HttpBody::setMb(MemBuf * mb_) { - clear(); delete mb; /* note: protection against assign-to-self is not needed * as MemBuf doesn't have a copy-constructor. If such a constructor -- 2.47.3