Closed schiotz closed 6 years ago
Hi everyone,
I've been using pyqstem for a while and never got any problems until recently, when I had to recompile it. I observed that some simulations that before ran perfectly now produced core dump error related with memory allocation. In these programs I was running fast pyqstem simulations in a loop.
After some tinkering I discovered that recreating que PyQSTEM object inside of the loop corrected these errors, but this also made the execution (dramatically) slower.
The fix proposed in this pull request has fixed the problem. I thus recommend considering the merge.
I write this hoping this will serve some purpose. Anyhow, thanks Jacob for this nice software, Alberto E.
First, the pointer to pointer was deallocated, then the underlying pointer (accessed through the now-deallocated and therefore invalid pointer).