dictCleanup(3)

✨ dictCleanup(3) ✨

okay bestie, welcome to the dictCleanup page from util/dict.h β€” yes she's a real one, a lil function that goes through your dictionary and cleans house πŸ’…


🌸 NAME 🌸

dictCleanup β€” cleanup dictionary. that's it, that's the vibe. she tidies. 🧹✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <util/dict.h>

void dictCleanup(dictCtx dict, dictCleanupFunc cleanup, void *rock);

πŸŽ€ ARGUMENTS πŸŽ€

  • dict β€” the dictionary you're cleaning up. your main character dict πŸ‘‘
  • cleanup β€” the cleanup callback. the girl doing the actual work 🫢
  • rock β€” the thing you pass along to cleanup. her little plus-one πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

okay so listen. dictCleanup calls cleanup for every single item in dict. every. one. no skipping, no playing favourites 🎯

and here's the tea: if cleanup returns true, then that item gets removed from dict. like, gone gone. so your callback is lowkey the bouncer deciding who stays and who gets escorted out the door πŸ’€βœ¨

MT-Level: Safe if dict is thread-safe. that's it, that's the whole condition β€” no cap πŸ”₯

⭐ RETURN VALUE ⭐

None. she gives you nothing back and honestly? iconic behaviour. she just does the thing and leaves πŸ™ˆ


🌈 SEE ALSO 🌈


and that's the whole page bestie, fr fr πŸ“βœ¨ this came to you from ClearSilver, dated 12 July 2007 β€” vintage but still slaying πŸ’…πŸ¦‹ bye pookie, go clean up that dict πŸŽ€