Commit 9ebd9073 authored by Arjen Hiemstra's avatar Arjen Hiemstra

Unref smi process when LinuxNvidiaGpu gets deleted

Not necessarily very relevant currently but makes the code more
consistent and future proof.
parent 552f2307
......@@ -23,7 +23,11 @@ LinuxNvidiaGpu::LinuxNvidiaGpu(int index, const QString& id, const QString& name
LinuxNvidiaGpu::~LinuxNvidiaGpu()
{
for (auto sensor : {m_usageProperty, m_totalVramProperty, m_usedVramProperty, m_temperatureProperty, m_coreFrequencyProperty, m_memoryFrequencyProperty}) {
if (sensor->isSubscribed()) {
LinuxNvidiaGpu::s_smiProcess->unref();
}
}
}
void LinuxNvidiaGpu::initialize()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment