From cbc5431d62e3fe9166f18395dce3ddf2af0906d3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 28 Mar 2026 21:32:23 +0000 Subject: Switch modules from reference<> to shared_ptr<> and weak_ptr<>. --- modules/httpd_stats.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/httpd_stats.cpp') diff --git a/modules/httpd_stats.cpp b/modules/httpd_stats.cpp index e1e06aff2..2e82970c4 100644 --- a/modules/httpd_stats.cpp +++ b/modules/httpd_stats.cpp @@ -453,9 +453,9 @@ private: public: ModuleHttpStats() : Module(VF_VENDOR, "Provides XML-serialised statistics about the server, channels, and users over HTTP via the /stats path.") - , HTTPRequestEventListener(this) - , API(this) - , isupportevprov(this) + , HTTPRequestEventListener(weak_from_this()) + , API(weak_from_this()) + , isupportevprov(weak_from_this()) { isevprov = &isupportevprov; } @@ -495,7 +495,7 @@ public: serializer.EndBlock(); /* Send the document back to m_httpd */ - HTTPDocumentResponse response(this, request, serializer.GetData(), 200); + HTTPDocumentResponse response(weak_from_this(), request, serializer.GetData(), 200); response.headers.SetHeader("X-Powered-By", MODNAME); response.headers.SetHeader("Content-Type", "text/xml"); API->SendResponse(response); -- cgit v1.3.1-10-gc9f91