I’m having a bit of trouble getting a C program to send an event using TSendUserEvent(). I’m getting a protection fault from within the call, so clearly I’ve not set up the call properly, but am at a loss to explain what I’ve done wrong.
It appears that the problem is in the freeing of the user_data structure. I guess it’s some sort of timing problem, and removing TKVListFree() removes the problem.
However, this would mean that the memory would never be freed up. Solution, anyone?