Possible memory leak

Hi @torbengb ,

could you check the possible solutions in this GitHub issue and let me know if one of them worked for you?