@@ -1,27 +1,31 @@
#pragma once
-template< class T >
-class ReferenceCounting : public T
-{
-private:
- int ref;
-public:
- ReferenceCounting()
- : T()
+namespace Framework
+{
+ template< class T >
+ class ReferenceCounting : public T
{
- ref = 1;
- }
+ private:
+ int ref;
- T *getThis()
- {
- ref++;
- return this;
+ public:
+ ReferenceCounting()
+ : T()
+ {
+ ref = 1;
+ }
- T *release()
- if( !--ref )
- delete this;
- return 0;
-};
+ T *getThis()
+ ref++;
+ return this;
+
+ T *release()
+ if( !--ref )
+ delete this;
+ return 0;
+ };
+}