Memory leak during VTK write
ligazetom opened this issue · comments
Description
Memory leak (caught by sc) happens during VTK cell data writing, if you don't write out rank and/or level. I checked versions from master 2.2 as well as from develop branch and it happens in all of them.
This is caused by deallocating variables locidx_data
and uint8_data
during normal execution only inside of if
statements for the respective arguments. That is why you need both, level and rank to be 1. If either one of them is 0, one of the variables won't get deallocated.
To Reproduce
This is minimal failing example (edited step1, you need hw32.h as well).
Additional information
I will create PR to fix this, just wanted to create issue first, so anyone else can confirm.
Good point, will look at PR. Thanks!