/
EugenyCh7
/
Puppet2D.Net
Обзор
Документация
Войти
/
EugenyCh7
/
Puppet2D.Net
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Puppet2D.System/Allocation.cs
26 строк
861 B
EugenyCh7
+ Puppet2D.System
15 июл 2025, 22:42
15 июл 2025, 22:42
fa97cb0
Код
Авторство
О чём код?
using System.Runtime.InteropServices; using System.Security; using System; namespace Puppet2D.System { /// <summary> /// Contains functions related to memory allocation. /// For internal use only. /// </summary> public static class Allocation { /// <summary> /// This function deallocates the memory being pointed to /// using the free function from the C standard library. /// /// The memory must have been previously allocated using a call /// to malloc. /// </summary> /// <param name="ptr">Pointer to the memory to deallocate</param> public static void Free(IntPtr ptr) => sfFree(ptr); [DllImport(CSFML.system, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfFree(IntPtr ptr); } }