释放掉读取文件的内存

This commit is contained in:
tanjing 2023-12-05 18:14:04 +08:00
parent 9e475d8602
commit bfc20e34e1
2 changed files with 9 additions and 0 deletions

View File

@ -111,6 +111,14 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDar
}
}
UKUIConfigStyleParameters::~UKUIConfigStyleParameters()
{
if(m_readCfg)
{
delete m_readCfg;
}
}
void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bool isDark)
{
if (!QFile(colorPath).exists()) {

View File

@ -52,6 +52,7 @@ class UKUIConfigStyleParameters: public QObject
Q_OBJECT
public:
UKUIConfigStyleParameters(QObject *parent, bool isDark, QString cfgName = "");
~UKUIConfigStyleParameters();
enum SpinBoxControlLayout {
Horizontal,