DC_BLUETOOTH_DEVICE_FREE(3)
π dc_bluetooth_device_free(3) β the "bye bestie" function π
okay so picture this: you've got a bluetooth device object hanging around, and you're done with it. like, done done. this is the function that says "thanks for everything, now go away" and actually cleans up after it. no cap.
β¨ NAME β¨
dc_bluetooth_device_free β bestie, this destroys the bluetooth device and frees all the resources. every last one. it's giving responsible cleanup. π§Ήπ
π LIBRARY π
you'll find this in the library called libdivecomputer. that's the one. the icon. the moment. π
πΈ SYNOPSIS πΈ
like, here's how you actually use it:
#include <libdivecomputer/bluetooth.h>
void
dc_bluetooth_device_free(dc_bluetooth_device_t *device);
π DESCRIPTION π
okay so real talk: this function destroys the bluetooth device and frees all resources. that's the whole vibe. it's the cleanup crew. the "you don't have to go home but you can't stay here" of bluetooth device objects.
and where do you usually get one of these bluetooth device things? great question, bestie. you normally find it by searching through dc_bluetooth_iterator_new(3). so like, you iterate, you find your device, you do your thing, and then when you're done you hit it with dc_bluetooth_device_free and it's β¨goneβ¨. periodt.
lowkey important: once you call this, that device pointer is donezo. don't be texting it after you've freed it, that's not the move. π
π SEE ALSO π
dc_bluetooth_iterator_new(3)β the function that helps you find the device in the first place. the origin story. the prequel. π¦
π AUTHORS π
the library libdivecomputer was written by Jef Driesen, and you can reach him at jef@libdivecomputer.org. he's the main character here, fr fr.
this manpage was written by Vincent Hagen, vinnie@script4web.nl. we love a documentation moment. π«Ά
and that's the whole page, bestie! this gem dropped with Debian on June 5, 2020, and it's officially known as DC_BLUETOOTH_DEVICE_FREE(3). go forth and free your bluetooth devices responsibly. mwah! πβ¨π
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2020 Vincent Hagen <vinnie@script4web.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms