MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / xs_serial_destructor

Function xs_serial_destructor

modules/io/serial/mac/serial.c:74–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72static void fxSerialSetFormat(xsMachine *the, xsSerial s, char *format);
73
74void xs_serial_destructor(void *data)
75{
76 xsSerial s = data;
77 if (!s) return;
78
79 if (s->writable)
80 modTimerRemove(s->writable);
81
82 if (s->flush)
83 modTimerRemove(s->flush);
84
85 if (s->serialSocket)
86 CFSocketInvalidate(s->serialSocket);
87
88 free(data);
89}
90
91void xs_serial_constructor(xsMachine *the)
92{

Callers 1

xs_serial_closeFunction · 0.70

Calls 1

modTimerRemoveFunction · 0.50

Tested by

no test coverage detected