mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-08 10:10:00 +00:00
Fix of memory leak
This commit is contained in:
parent
e792bd80fe
commit
18dd603696
|
@ -139,6 +139,10 @@ namespace OpenTK.Platform.SDL2
|
||||||
[DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_FreeSurface", ExactSpelling = true)]
|
[DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_FreeSurface", ExactSpelling = true)]
|
||||||
public static extern void FreeSurface(IntPtr surface);
|
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
|
#region GameContoller
|
||||||
|
|
||||||
[SuppressUnmanagedCodeSecurity]
|
[SuppressUnmanagedCodeSecurity]
|
||||||
|
|
|
@ -201,6 +201,7 @@ namespace OpenTK.Platform.SDL2
|
||||||
if (windows.TryGetValue(ev.Drop.WindowID, out window))
|
if (windows.TryGetValue(ev.Drop.WindowID, out window))
|
||||||
{
|
{
|
||||||
ProcessDropEvent(window, ev.Drop);
|
ProcessDropEvent(window, ev.Drop);
|
||||||
|
SDL.Free(ev.Drop.File);
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue