Hi Matheus, On Sat, 18 Jul 2020, Matheus Tavares Bernardino wrote: > On Thu, Jul 16, 2020 at 9:56 AM Johannes Schindelin > <Johannes.Schindelin@xxxxxx> wrote: > > Alternatively, if using thread-local storage is still an option, I > think I might have solved the problems we had in the previous > iteration with memory leaks on Windows. I changed our > pthread_key_create() emulation to start using the destructor callback > on Windows, through the Fiber Local Storage (FLS) API. As the > documentation says [1] "If no fiber switching occurs, FLS acts exactly > the same as thread local storage". The advantage over TLS is that > FLSAlloc() does take a callback parameter. Okay, but I am still not so enthusiastic. We can fix this in a much simpler way, I believe, than introducing the first thread-local storage user. Let's leave TLS until the time we actually need it? Ciao, Dscho