Fix a memory leak for NppParameters
Fix a memory leak due to not releasing allocated memory for NppParameters while quitting Notepad++
This commit is contained in:
parent
5cf296ee10
commit
445dc5ebc1
@ -1439,6 +1439,7 @@ void NppParameters::destroyInstance()
|
|||||||
delete _pXmlContextMenuDocA;
|
delete _pXmlContextMenuDocA;
|
||||||
delete _pXmlSessionDoc;
|
delete _pXmlSessionDoc;
|
||||||
delete _pXmlBlacklistDoc;
|
delete _pXmlBlacklistDoc;
|
||||||
|
delete getInstancePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1291,11 +1291,17 @@ const int RECENTFILES_SHOWONLYFILENAME = 0;
|
|||||||
|
|
||||||
class NppParameters final
|
class NppParameters final
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
static NppParameters* getInstancePointer() {
|
||||||
|
static NppParameters* instance = new NppParameters;
|
||||||
|
return instance;
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static NppParameters& getInstance() {
|
static NppParameters& getInstance() {
|
||||||
static NppParameters* instance = new NppParameters;
|
return *getInstancePointer();
|
||||||
return *instance;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static LangType getLangIDFromStr(const TCHAR *langName);
|
static LangType getLangIDFromStr(const TCHAR *langName);
|
||||||
static generic_string getLocPathFromStr(const generic_string & localizationCode);
|
static generic_string getLocPathFromStr(const generic_string & localizationCode);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user