MCPcopy Create free account
hub / github.com/SFML/SFML / close

Method close

src/SFML/Window/macOS/JoystickImpl.cpp:341–362  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

339
340////////////////////////////////////////////////////////////
341void JoystickImpl::close()
342{
343 const AutoreleasePool pool;
344
345 for (IOHIDElementRef iohidElementRef : m_buttons)
346 CFRelease(iohidElementRef);
347
348 m_buttons.clear();
349
350 for (const auto& [axis, iohidElementRef] : m_axis)
351 CFRelease(iohidElementRef);
352
353 m_axis.clear();
354
355 if (m_hat != nullptr)
356 CFRelease(m_hat);
357
358 m_hat = nullptr;
359
360 // And we unregister this joystick
361 m_locationIDs[m_index] = 0;
362}
363
364
365////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected