TanmayPatil105 / procfetch

🎨 Yet another command-line system information utility written in C++
https://tanmaypatil105.github.io/procfetch/
GNU General Public License v3.0
23 stars 11 forks source link

Fix memory leaks #157

Closed TanmayPatil105 closed 5 months ago

TanmayPatil105 commented 5 months ago

Fixes #156

Valgrind

No more memory leaks

$ valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes src/procfetch 
==99702== Memcheck, a memory error detector
==99702== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==99702== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==99702== Command: src/procfetch
==99702== 

   __  __ __                   __        
  / / / // /_   __  __ ____   / /_ __  __
 / / / // __ \ / / / // __ \ / __// / / /
/ /_/ // /_/ // /_/ // / / // /_ / /_/ / 
\____//_.___/ \__,_//_/ /_/ \__/ \__,_/  

tanmay@tanmay-lenovo

OS : Ubuntu 24.04 LTS x86_64
Host : 81DE Lenovo ideapad 330-15IKB
Kernel : 6.8.0-35-generic
UpTime : 10 hours, 26 mins
RAM : 3257MiB / 7848MiB
shell : fish
DE : ubuntu:GNOME
Resolution : 1366x768
Theme : Yaru-red-dark
Icons : Yaru-red
CPU : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
CPU Temperature : 45 °C
GPU : Intel Corporation UHD Graphics 620
GPU : NVIDIA Corporation GP108M [GeForce MX150]
Packages : 2710 dpkg; 49 flatpak; 14 snap; 

==99702== 
==99702== HEAP SUMMARY:
==99702==     in use at exit: 0 bytes in 0 blocks
==99702==   total heap usage: 443 allocs, 443 frees, 1,476,665 bytes allocated
==99702== 
==99702== All heap blocks were freed -- no leaks are possible
==99702== 
==99702== For lists of detected and suppressed errors, rerun with: -s
==99702== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.37%. Comparing base (6aa37dd) to head (ee9cff1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #157 +/- ## ========================================== + Coverage 96.35% 96.37% +0.01% ========================================== Files 2 2 Lines 247 248 +1 ========================================== + Hits 238 239 +1 Misses 9 9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.