PS_DELETE(3)

πŸŽ€ NAME

PS_delete β€” deletes every last resource of a PostScript document. all of them. gone. it's giving "spring cleaning but for memory" 🧹✨

(also hi bestie, this page lives in the Library Functions Manual, section 3, so it's a library function situation, not a command you type into your shell, ok? iykyk)


✨ SYNOPSIS

#include <pslib.h>

void PS_delete(PSDoc *psdoc)

πŸ’… DESCRIPTION

okay so the main character job of this function is freeing the memory that the document was using. that's the whole vibe. 🫢

it also closes a file, but only if that file wasn't already closed before with PS_close(3). so it's like a backup plan, a little safety net, bestie behavior honestly.

BUT. you should still close the file with PS_close(3) first, before you call this. and here's why, because it matters: PS_close(3) doesn't just close the file β€” it also writes out a last line containing the PostScript comment with the number of pages in the document. πŸ’–

and if that comment isn't there? a PostScript viewer may not show the number of pages properly. like, the page count just won't display right. so do the PS_close(3) first, fr fr. 😭


πŸ‘€ SEE ALSO

  • PS_close(3) β€” the one you should be calling first, bestie πŸ’«

πŸ’œ AUTHOR

this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service, king πŸ‘‘


and that's the whole page, babes πŸ¦‹ β€” this was PS_DELETE(3), hanging out in section 3 of the Library Functions Manual. go free that memory and close your files properly πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from