From 916aa7b1536b8828aee336016dc58fb0e4336759 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 12 Dec 2011 03:35:42 -0700 Subject: [PATCH] Cleanup: 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.2