Fix of memory leak

This commit is contained in:
Vlad K 2017-05-09 05:36:54 +03:00
parent e792bd80fe
commit 18dd603696
2 changed files with 6 additions and 1 deletions

View file

@ -139,6 +139,10 @@ namespace OpenTK.Platform.SDL2
[DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_FreeSurface", ExactSpelling = true)]
public static extern void FreeSurface(IntPtr surface);
[SuppressUnmanagedCodeSecurity]
[DllImport (lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_free", ExactSpelling = true)]
public static extern void Free (IntPtr memblock);
#region GameContoller
[SuppressUnmanagedCodeSecurity]

View file

@ -201,6 +201,7 @@ namespace OpenTK.Platform.SDL2
if (windows.TryGetValue(ev.Drop.WindowID, out window))
{
ProcessDropEvent(window, ev.Drop);
SDL.Free(ev.Drop.File);
processed = true;
}
break;