From 14c13b0b4440c756484575797f858f6140645e90 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Thu, 24 Nov 2005 06:44:07 +0000 Subject: [PATCH] Remove leakfinder debugging calls which probably should never been committed --- src/ICAP/ICAPClientReqmodPrecache.cc | 23 ----------------------- src/ICAP/ICAPClientRespmodPrecache.cc | 23 ----------------------- src/ICAP/MsgPipe.cc | 17 +---------------- 3 files changed, 1 insertion(+), 62 deletions(-) diff --git a/src/ICAP/ICAPClientReqmodPrecache.cc b/src/ICAP/ICAPClientReqmodPrecache.cc index 1c98c77168..97db5ad08e 100644 --- a/src/ICAP/ICAPClientReqmodPrecache.cc +++ b/src/ICAP/ICAPClientReqmodPrecache.cc @@ -10,10 +10,6 @@ #include "ICAPServiceRep.h" #include "ICAPClient.h" -#include "LeakFinder.h" - -extern LeakFinder *MsgPipeLeaker; - CBDATA_CLASS_INIT(ICAPClientReqmodPrecache); ICAPClientReqmodPrecache::ICAPClientReqmodPrecache(ICAPServiceRep::Pointer aService): service(aService), http(NULL), virgin(NULL), adapted(NULL) @@ -40,7 +36,6 @@ void ICAPClientReqmodPrecache::startReqMod(ClientHttpRequest *aHttp, HttpRequest http = cbdataReference(aHttp); virgin = new MsgPipe("virgin"); // this is the place to create a refcount ptr - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->source = this; virgin->data = new MsgPipeData; virgin->data->cause = NULL; @@ -49,7 +44,6 @@ void ICAPClientReqmodPrecache::startReqMod(ClientHttpRequest *aHttp, HttpRequest virgin->data->body->init(ICAP::MsgPipeBufSizeMin, ICAP::MsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); - leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted->sink = this; ICAPInitXaction(service, virgin, adapted); @@ -67,7 +61,6 @@ void ICAPClientReqmodPrecache::sendMoreData(StoreIOBuffer buf) * than will fit in body MemBuf. Caller should use * potentialSpaceSize() to find out how much we can hold. */ - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->data->body->append(buf.data, buf.length); virgin->sendSourceProgress(); } @@ -78,8 +71,6 @@ ICAPClientReqmodPrecache::potentialSpaceSize() if (virgin == NULL) return 0; - leakTouch(virgin.getRaw(), MsgPipeLeaker); - return (int) virgin->data->body->potentialSpaceSize(); } @@ -87,7 +78,6 @@ ICAPClientReqmodPrecache::potentialSpaceSize() void ICAPClientReqmodPrecache::doneSending() { debug(93,3)("ICAPClientReqmodPrecache::doneSending() called\n"); - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->sendSourceFinish(); } @@ -104,8 +94,6 @@ void ICAPClientReqmodPrecache::noteSinkNeed(MsgPipe *p) { debug(93,3)("ICAPClientReqmodPrecache::noteSinkNeed() called\n"); - leakTouch(virgin.getRaw(), MsgPipeLeaker); - if (virgin->data->body->potentialSpaceSize()) http->icapSpaceAvailable(); } @@ -122,7 +110,6 @@ void ICAPClientReqmodPrecache::noteSinkAbort(MsgPipe *p) void ICAPClientReqmodPrecache::noteSourceStart(MsgPipe *p) { debug(93,3)("ICAPClientReqmodPrecache::noteSourceStart() called\n"); - leakTouch(adapted.getRaw(), MsgPipeLeaker); http->takeAdaptedHeaders(adapted->data->header); noteSourceProgress(p); } @@ -133,8 +120,6 @@ void ICAPClientReqmodPrecache::noteSourceProgress(MsgPipe *p) debug(93,3)("ICAPClientReqmodPrecache::noteSourceProgress() called\n"); //tell ClientHttpRequest to store a fresh portion of the adapted response - leakTouch(p, MsgPipeLeaker); - if (p->data->body->hasContent()) { http->takeAdaptedBody(p->data->body); } @@ -145,7 +130,6 @@ void ICAPClientReqmodPrecache::noteSourceFinish(MsgPipe *p) { debug(93,3)("ICAPClientReqmodPrecache::noteSourceFinish() called\n"); //tell ClientHttpRequest that we expect no more response data - leakTouch(p, MsgPipeLeaker); http->doneAdapting(); stop(notifyNone); } @@ -154,7 +138,6 @@ void ICAPClientReqmodPrecache::noteSourceFinish(MsgPipe *p) void ICAPClientReqmodPrecache::noteSourceAbort(MsgPipe *p) { debug(93,3)("ICAPClientReqmodPrecache::noteSourceAbort() called\n"); - leakTouch(p, MsgPipeLeaker); stop(notifyOwner); } @@ -162,8 +145,6 @@ void ICAPClientReqmodPrecache::noteSourceAbort(MsgPipe *p) void ICAPClientReqmodPrecache::stop(Notify notify) { if (virgin != NULL) { - leakTouch(virgin.getRaw(), MsgPipeLeaker); - if (notify == notifyIcap) virgin->sendSourceAbort(); else @@ -173,8 +154,6 @@ void ICAPClientReqmodPrecache::stop(Notify notify) } if (adapted != NULL) { - leakTouch(adapted.getRaw(), MsgPipeLeaker); - if (notify == notifyIcap) adapted->sendSinkAbort(); else @@ -199,13 +178,11 @@ void ICAPClientReqmodPrecache::freeVirgin() // virgin->data->cause should be NULL; requestUnlink(dynamic_cast(virgin->data->header)); virgin->data->header = NULL; - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin = NULL; // refcounted } void ICAPClientReqmodPrecache::freeAdapted() { adapted->data->header = NULL; // we don't own it - leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted = NULL; // refcounted } diff --git a/src/ICAP/ICAPClientRespmodPrecache.cc b/src/ICAP/ICAPClientRespmodPrecache.cc index a340368be6..4cc8370573 100644 --- a/src/ICAP/ICAPClientRespmodPrecache.cc +++ b/src/ICAP/ICAPClientRespmodPrecache.cc @@ -10,12 +10,8 @@ #include "ICAPClient.h" #include "ICAPServiceRep.h" -#include "LeakFinder.h" - CBDATA_CLASS_INIT(ICAPClientRespmodPrecache); -extern LeakFinder *MsgPipeLeaker; - ICAPClientRespmodPrecache::ICAPClientRespmodPrecache(ICAPServiceRep::Pointer aService): service(aService), httpState(NULL), virgin(NULL), adapted(NULL) { debug(93,5)("ICAPClientRespmodPrecache constructed, this=%p\n", this); @@ -41,7 +37,6 @@ void ICAPClientRespmodPrecache::startRespMod(HttpStateData *anHttpState, HttpReq httpState = cbdataReference(anHttpState); virgin = new MsgPipe("virgin"); // this is the place to create a refcount ptr - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->source = this; virgin->data = new MsgPipeData; virgin->data->cause = requestLink(request); @@ -50,7 +45,6 @@ void ICAPClientRespmodPrecache::startRespMod(HttpStateData *anHttpState, HttpReq virgin->data->body->init(ICAP::MsgPipeBufSizeMin, ICAP::MsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); - leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted->sink = this; #if ICAP_ANCHOR_LOOPBACK @@ -74,7 +68,6 @@ void ICAPClientRespmodPrecache::sendMoreData(StoreIOBuffer buf) * than will fit in body MemBuf. Caller should use * potentialSpaceSize() to find out how much we can hold. */ - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->data->body->append(buf.data, buf.length); virgin->sendSourceProgress(); } @@ -85,8 +78,6 @@ ICAPClientRespmodPrecache::potentialSpaceSize() if (virgin == NULL) return 0; - leakTouch(virgin.getRaw(), MsgPipeLeaker); - return (int) virgin->data->body->potentialSpaceSize(); } @@ -103,7 +94,6 @@ void ICAPClientRespmodPrecache::doneSending() return; #else - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->sendSourceFinish(); #endif } @@ -120,8 +110,6 @@ void ICAPClientRespmodPrecache::noteSinkNeed(MsgPipe *p) { debug(93,5)("ICAPClientRespmodPrecache::noteSinkNeed() called\n"); - leakTouch(virgin.getRaw(), MsgPipeLeaker); - if (virgin->data->body->potentialSpaceSize()) httpState->icapSpaceAvailable(); } @@ -138,7 +126,6 @@ void ICAPClientRespmodPrecache::noteSinkAbort(MsgPipe *p) void ICAPClientRespmodPrecache::noteSourceStart(MsgPipe *p) { debug(93,5)("ICAPClientRespmodPrecache::noteSourceStart() called\n"); - leakTouch(adapted.getRaw(), MsgPipeLeaker); HttpReply *reply = dynamic_cast(adapted->data->header); assert(reply); // check that ICAP xaction created the right object @@ -156,8 +143,6 @@ void ICAPClientRespmodPrecache::noteSourceProgress(MsgPipe *p) debug(93,5)("ICAPClientRespmodPrecache::noteSourceProgress() called\n"); //tell HttpStateData to store a fresh portion of the adapted response - leakTouch(p, MsgPipeLeaker); - if (p->data->body->hasContent()) { httpState->takeAdaptedBody(p->data->body); } @@ -168,7 +153,6 @@ void ICAPClientRespmodPrecache::noteSourceFinish(MsgPipe *p) { debug(93,5)("ICAPClientRespmodPrecache::noteSourceFinish() called\n"); //tell HttpStateData that we expect no more response data - leakTouch(p, MsgPipeLeaker); httpState->doneAdapting(); stop(notifyNone); } @@ -177,7 +161,6 @@ void ICAPClientRespmodPrecache::noteSourceFinish(MsgPipe *p) void ICAPClientRespmodPrecache::noteSourceAbort(MsgPipe *p) { debug(93,5)("ICAPClientRespmodPrecache::noteSourceAbort() called\n"); - leakTouch(p, MsgPipeLeaker); stop(notifyOwner); } @@ -185,8 +168,6 @@ void ICAPClientRespmodPrecache::noteSourceAbort(MsgPipe *p) void ICAPClientRespmodPrecache::stop(Notify notify) { if (virgin != NULL) { - leakTouch(virgin.getRaw(), MsgPipeLeaker); - if (notify == notifyIcap) virgin->sendSourceAbort(); else @@ -196,8 +177,6 @@ void ICAPClientRespmodPrecache::stop(Notify notify) } if (adapted != NULL) { - leakTouch(adapted.getRaw(), MsgPipeLeaker); - if (notify == notifyIcap) adapted->sendSinkAbort(); else @@ -222,7 +201,6 @@ void ICAPClientRespmodPrecache::freeVirgin() requestUnlink(virgin->data->cause); virgin->data->cause = NULL; virgin->data->header = NULL; - leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin = NULL; // refcounted } @@ -241,6 +219,5 @@ void ICAPClientRespmodPrecache::freeAdapted() adapted->data->header = NULL; } - leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted = NULL; // refcounted } diff --git a/src/ICAP/MsgPipe.cc b/src/ICAP/MsgPipe.cc index 2302956344..3c18f72010 100644 --- a/src/ICAP/MsgPipe.cc +++ b/src/ICAP/MsgPipe.cc @@ -4,9 +4,6 @@ #include "MsgPipeSink.h" #include "MsgPipeData.h" -#include "LeakFinder.h" -LeakFinder *MsgPipeLeaker = new LeakFinder; - CBDATA_CLASS_INIT(MsgPipe); // static event callback template @@ -30,21 +27,17 @@ MsgPipe_MAKE_CALLBACK(SinkAbort, source) MsgPipe::MsgPipe(const char *aName): name(aName), data(NULL), source(NULL), sink(NULL) -{ - leakAdd(this, MsgPipeLeaker); -} +{} MsgPipe::~MsgPipe() { delete data; delete source; delete sink; - leakFree(this, MsgPipeLeaker); }; void MsgPipe::sendSourceStart() { - leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceStart() called\n"); sendLater("SourceStart", &MsgPipe_sendSourceStart, sink); } @@ -53,14 +46,12 @@ void MsgPipe::sendSourceStart() void MsgPipe::sendSourceProgress() { - leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceProgress() called\n"); sendLater("SourceProgress", &MsgPipe_sendSourceProgress, sink); } void MsgPipe::sendSourceFinish() { - leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceFinish() called\n"); sendLater("sendSourceFinish", &MsgPipe_sendSourceFinish, sink); source = NULL; @@ -68,7 +59,6 @@ void MsgPipe::sendSourceFinish() void MsgPipe::sendSourceAbort() { - leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceAbort() called\n"); sendLater("SourceAbort", &MsgPipe_sendSourceAbort, sink); source = NULL; @@ -77,14 +67,12 @@ void MsgPipe::sendSourceAbort() void MsgPipe::sendSinkNeed() { - leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSinkNeed() called\n"); sendLater("SinkNeed", &MsgPipe_sendSinkNeed, source); } void MsgPipe::sendSinkAbort() { - leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSinkAbort() called\n"); sendLater("SinkAbort", &MsgPipe_sendSinkAbort, source); sink = NULL; @@ -92,15 +80,12 @@ void MsgPipe::sendSinkAbort() void MsgPipe::sendLater(const char *callName, EVH * handler, MsgPipeEnd *destination) { - leakTouch(this, MsgPipeLeaker); - if (canSend(destination, callName, true)) eventAdd(callName, handler, this, 0.0, 0, true); } bool MsgPipe::canSend(MsgPipeEnd *destination, const char *callName, bool future) { - leakTouch(this, MsgPipeLeaker); const bool res = destination != NULL; const char *verb = future ? (res ? "will send " : "wont send ") : -- 2.47.3