Use a static cFSPropDisplayer instead of creating a fresh one each time someone asks. Addresses a valgrind leak that only manifests in interactive db update mode.

This commit is contained in:
Brian Cox 2017-08-27 22:58:58 -07:00
parent b3b74fd76e
commit d724c07873
1 changed files with 6 additions and 1 deletions

View File

@ -76,7 +76,12 @@ iFCOSpec* cFSFactory::CreateSpec(const TSTRING& name, iFCOSpecHelper* pHelper) c
iFCOPropDisplayer* cFSFactory::CreatePropDisplayer() const iFCOPropDisplayer* cFSFactory::CreatePropDisplayer() const
{ {
return new cFSPropDisplayer(); static iFCOPropDisplayer* gPropDisplayer = 0;
if (!gPropDisplayer)
gPropDisplayer = new cFSPropDisplayer();
return gPropDisplayer;
} }
iSerRefCountObj::CreateFunc cFSFactory::GetCreateFunc() const iSerRefCountObj::CreateFunc cFSFactory::GetCreateFunc() const