QB_HDB_HANDLE_DESTROY(3)
β¨ qb_hdb_handle_destroy β¨
okay bestie, pull up a chair, we're reading a page from the libqb Programmer's Manual and it's honestly a short one but it's so important π
πΈ NAME πΈ
qb_hdb_handle_destroy β Request the destruction of the object.
like, you're politely asking the object to go away. you're not doing it yourself, you're requesting. main character energy but make it a function call π
π SYNOPSIS π
#include <qb/qbhdb.h>
int32_t qb_hdb_handle_destroy(
struct qb_hdb *hdb, /* the database instance */
qb_handle_t handle_in /* the handle */
);
π¦ PARAMS π¦
hdbβ the database instance ποΈhandle_inβ the handle π·οΈ
π DESCRIPTION π
okay so here's the whole vibe: when the refcount is 0, it will be destroyed. that's it. that's the tea β the object doesn't dip out while people are still holding onto it β it waits, and once nobody's counting on it anymore, poof, gone π«Ά
π§ STRUCTURES π§
the way this struct is literally just sitting here, iconic:
struct qb_hdb {
uint32_t handle_count;
qb_array_t handles;
uint32_t iterator;
void (*destructor)(void *);
uint32_t first_run;
};
π RETURN VALUE π
(0 == ok, -errno failure)
so like, 0 means slay π, anything -errno means it's giving problem π
π SEE ALSO π
the whole friend group, fr fr:
qb_hdb_handle_get(3)qb_hdb_iterator_reset(3)qb_hdb_handle_create(3)qb_hdb_handle_refcount_get(3)qb_hdb_iterator_next(3)qb_hdb_nocheck_convert(3)qb_hdb_create(3)qb_hdb_destroy(3)qb_hdb_base_convert(3)qb_hdb_handle_get_always(3)qb_hdb_handle_put(3)
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
lowkey reminder: this is a request, not a demand. the destruction only actually happens once the refcount hits 0. respect the count, bestie π
and that's a wrap on the qb_hdb_handle_destroy(3) page from the libqb Programmer's Manual, dated 2025-09-16 ππ no cap, you understood all of it, periodt β¨π¦
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms