class_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ class_destroy(9) ✨

okay bestie, so this one is a little kernel API manual page β€” class_destroy(9) β€” and honestly? it's giving "short but important" energy. no cap, it's a tiny one, but you need to know it. let's get into it πŸ’…


🌸 NAME 🌸

class_destroy β€” destroys a struct class structure. literally what it says on the tin, bestie. it's the cleanup bestie to class_create. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

void class_destroy (const struct class *cls );

that's it. that's the whole signature. void return, one argument, no drama. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • cls β€” pointer to the struct class that is to be destroyed. like, the actual one you want gone. not a copy, not a vibe, the pointer itself. πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so the one thing to remember here, and i mean the thing:

Note, the pointer to be destroyed must have been created with a call to class_create.

fr fr. if you didn't make it with class_create, do not hand it to class_destroy. that's the whole rule. it's not a suggestion, it's the rule. 😭


🌈 SEE ALSO 🌈

like, go read class_create(9) first if you're confused β€” they're literally a matched set, iykyk. πŸ”₯


⭐ sign-off ⭐

this iconic little number lives in ./drivers/base, and it's dated October 2026 β€” so yeah, she's from the future (or at least the kernel's version of it πŸ’€). go forth and clean up your classes responsibly, bestie. mwah. πŸ§šπŸ’œ

πŸ“¦ where this page comes from