T *data;
};
-/*template<typename T>
-class MutexPtr: public RefCount
-{
-public:
- MutexPtr(T *d, Mutex &m): mutex(m), data(d) { mutex.lock(); }
- MutexPtr(const MutexPtr<T> &p): RefCount(p), mutex(p.mutex), data(p.data) { }
- T &operator*() const { return *data; }
- T *operator->() const { return data; }
- void clear() { decref(); data = 0; }
- ~MutexPtr() { decref(); }
-protected:
- Mutex &mutex;
- T *data;
-
- bool decref()
- {
- if(!RefCount::decref())
- {
- mutex.unlock();
- return false;
- }
- return true;
- }
-};*/
-
}
#endif