summaryrefslogtreecommitdiffstats
path: root/src/Common/SystemBackend.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-14 23:16:58 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-14 23:16:58 +0200
commit082dac7a8cb39ec1b005680680c4f3e1e8ddc256 (patch)
tree1db7b02d84cdd1882e15d3a1abfd8e93925a4af6 /src/Common/SystemBackend.h
parentfd9b1506a3b3858235e91cce45805f6d54caae4f (diff)
downloadmad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.tar
mad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.zip
Verwende statische Instanzen von ConfigManager, ConnectionManager und RequestManager (Singleton)
Diffstat (limited to 'src/Common/SystemBackend.h')
-rw-r--r--src/Common/SystemBackend.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/SystemBackend.h b/src/Common/SystemBackend.h
index 6929c8d..19b0715 100644
--- a/src/Common/SystemBackend.h
+++ b/src/Common/SystemBackend.h
@@ -21,20 +21,20 @@
#define MAD_COMMON_SYSTEMBACKEND_H_
#include <stdint.h>
+#include <memory>
namespace Mad {
namespace Common {
class SystemBackend {
private:
- static SystemBackend *backend;
+ static std::auto_ptr<SystemBackend> backend;
protected:
SystemBackend() {}
static void setBackend(SystemBackend *backend0) {
- delete backend;
- backend = backend0;
+ backend = std::auto_ptr<SystemBackend>(backend0);
}
public:
@@ -63,7 +63,7 @@ class SystemBackend {
}
static SystemBackend *getBackend() {
- return backend;
+ return backend.get();
}
};