From de9f8a69c44e2c7debde51efdf3af0298b8d03d1 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 18 Nov 2011 11:13:36 -0800 Subject: Got this one wrong; one need to get the refcount to 0 to delete itself. --- includes/HttpServer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/HttpServer.h') diff --git a/includes/HttpServer.h b/includes/HttpServer.h index 2226d23..c2e8992 100644 --- a/includes/HttpServer.h +++ b/includes/HttpServer.h @@ -26,7 +26,7 @@ class HttpServer { ~Action() { Assert(m_refCount == 0); } typedef std::pair ActionMatches; ActionMatches matches(const char * uri, const char * host); - void unref() { if (Atomic::Prefetch::Decrement(&m_refCount) == 0) delete this; } + void unref() { if (Atomic::Decrement(&m_refCount) == 0) delete this; } void ref() { Atomic::Increment(&m_refCount); } void registerMe(HttpServer * server) { server->registerAction(this); } virtual bool Do(HttpServer * server, ActionMatches & m, IO out, StringMap & vars, StringMap & headers, FileList & files) = 0; -- cgit v1.2.3