sdlNetFreePacket function

void sdlNetFreePacket(
  1. Pointer<UDPpacket> packet
)

Dispose of a UDP packet.

This frees both the packet's payload and the packet itself. Once this call completes, the packet's pointer is invalid and should not be used anymore.

\param packet the packet to free.

\since This function is available since SDL_net 2.0.0.

\sa SDLNet_AllocPacket \sa SDLNet_ResizePacket

extern DECLSPEC void SDLCALL SDLNet_FreePacket(UDPpacket *packet)

Implementation

void sdlNetFreePacket(Pointer<UDPpacket> packet) {
  final sdlNetFreePacketLookupFunction = libSdl2Net.lookupFunction<
      Void Function(Pointer<UDPpacket> packet),
      void Function(Pointer<UDPpacket> packet)>('SDLNet_FreePacket');
  return sdlNetFreePacketLookupFunction(packet);
}