Fixed a blatant memory leak.
This commit is contained in:
parent
1828d8f1d9
commit
3189eb4597
1 changed files with 3 additions and 3 deletions
|
@ -25,9 +25,9 @@
|
|||
namespace n_token {
|
||||
|
||||
/// Do not inline this enforces static initialization order
|
||||
t_token const & t_token::z_empty() {
|
||||
static t_token *z_empty = new t_token("", false);
|
||||
return *z_empty;
|
||||
const t_token & t_token::z_empty() {
|
||||
static t_token z_empty("", false);
|
||||
return z_empty;
|
||||
}
|
||||
}//end namepace
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue