Ubinator's picture

XInputJoystick, what is it and how do I dispose of it?

XInputJoystick leaked, did you forget to call Dispose()?

Is what comes up when I exit my application in the debug log. I don't have anything to do with joysticks but I would like to get rid of this.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

You can get rid of this by initializing and disposing the toolkit explicitly:

static void Main()
{
     using (Toolkit.Init())
     {
        // use OpenTK as normal
     }
}

Otherwise, this warning is safe if it occurs when your application is shutting down (the OS will clean everything up.) It only matters when your application process keeps running after you stop using OpenTK.

Ubinator's picture

Thats interesting, because I only started getting the warning after adding that, before that I had a heap of other disposing errors, but it doesn't matter anyway because once opentk closes everything closes.