]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/sbuf/MemBlob.h
NoNewGlobals for MemBlob::Stats (#1749)
[thirdparty/squid.git] / src / sbuf / MemBlob.h
index 1932118f15ba2cb020929cad51df32b39cf9770d..e9304b9b5b9e91c09d0ba27b7f7669ab61f0e101 100644 (file)
 class MemBlobStats
 {
 public:
-    MemBlobStats();
-
     /// dumps class-wide statistics
     std::ostream& dump(std::ostream& os) const;
 
     MemBlobStats& operator += (const MemBlobStats&);
 
 public:
-    uint64_t alloc;     ///< number of MemBlob instances created so far
-    uint64_t live;      ///< number of MemBlob instances currently alive
-    uint64_t append;    ///< number of MemBlob::append() calls
-    uint64_t liveBytes; ///< the total size of currently allocated storage
+    uint64_t alloc = 0;     ///< number of MemBlob instances created so far
+    uint64_t live = 0;      ///< number of MemBlob instances currently alive
+    uint64_t append = 0;    ///< number of MemBlob::append() calls
+    uint64_t liveBytes = 0; ///< the total size of currently allocated storage
 };
 
 /** Refcountable, fixed-size, content-agnostic memory buffer.
@@ -115,8 +113,6 @@ public:
     const InstanceId<MemBlob> id; ///< blob identifier
 
 private:
-    static MemBlobStats Stats; ///< class-wide statistics
-
     void memAlloc(const size_type memSize);
 
     /// whether the offset points to the end of the used area