diff options
Diffstat (limited to 'base/ref_counted_memory.h')
-rw-r--r-- | base/ref_counted_memory.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/base/ref_counted_memory.h b/base/ref_counted_memory.h index 30d2917..eae7984 100644 --- a/base/ref_counted_memory.h +++ b/base/ref_counted_memory.h @@ -15,16 +15,19 @@ // A generic interface to memory. This object is reference counted because one // of its two subclasses own the data they carry, and we need to have // heterogeneous containers of these two types of memory. -class RefCountedMemory : public base::RefCountedThreadSafe< RefCountedMemory > { +class RefCountedMemory : public base::RefCountedThreadSafe<RefCountedMemory> { public: - virtual ~RefCountedMemory() {} - // Retrieves a pointer to the beginning of the data we point to. If the data // is empty, this will return NULL. virtual const unsigned char* front() const = 0; // Size of the memory pointed to. virtual size_t size() const = 0; + + protected: + friend class base::RefCountedThreadSafe<RefCountedMemory>; + + virtual ~RefCountedMemory() {} }; // An implementation of RefCountedMemory, where the ref counting does not |