Closed tDwtp closed 3 years ago
I think I found the error: It occurs as soon as the garbagecollector runs.
edit 1: adding collectgarbage("collect")
directly after the polling loop makes it even more visible.
I assume it is due to the flag mustdelete
which is set to 1 by commonPushUserdata. However that window is still in use!
I am not quite confident about my assumption here. I guess mustdelete
is used to determin, whether the underlying object must be freed, no the CommonUserdata per se.
edit 1: I recompiled with my fix, but it did not work?
edit 2: Changed the fix; its working now. If I did not undersand the mustdelete
-flag correctly, it may cause memory leaks!
I tried to use HitTests (in lua 5.2 with SDL 2.0.7). After some mouse movement inside the window, it suddenly turns invalid.
I made a minimal example here:
expected output: