git.stg.codes
/
stg.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix resource leak in file_store
[stg.git]
/
include
/
stg
/
plugin_creator.h
1
#ifndef __PLUGIN_CREATOR_H__
2
#define __PLUGIN_CREATOR_H__
3
4
template <class T>
5
class PLUGIN_CREATOR
6
{
7
public:
8
PLUGIN_CREATOR() : plugin(new T()) {}
9
~PLUGIN_CREATOR() { delete plugin; }
10
11
T * GetPlugin() { return plugin; }
12
13
private:
14
T * plugin;
15
};
16
17
#endif