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

Function xs_sensor_destructor

modules/drivers/w3csensor/sensor.c:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void xs_sensor_destructor(void *data)
101{
102 xsSensor sensor = data;
103
104 if (!sensor) return;
105
106 if (sensor->timer)
107 modTimerRemove(sensor->timer);
108
109 while (sensor->handlers) {
110 EventHandler next = sensor->handlers->next;
111 c_free(sensor->handlers);
112 sensor->handlers = next;
113 }
114
115 c_free(sensor);
116}
117
118void xs_sensor(xsMachine *the)
119{

Callers

nothing calls this directly

Calls 1

modTimerRemoveFunction · 0.50

Tested by

no test coverage detected