ost::StringObject(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

🌸 NAME 🌸

ost::StringObject β€” bestie, this is the class you derive your subclasses from when you want them to use the String managed memory pool for all their space allocations, by overriding the new and delete operators. it's giving "custom allocator, but make it inherited" πŸ’…


✨ SYNOPSIS ✨

#include <string.h>

πŸŽ€ Public Member Functions

  • void * operator new (size_t size) NEW_THROWS β€” create a new object in string managed space 🫢
  • void operator delete (void *obj) β€” delete an object from string managed space 🧚

πŸ’– Detailed Description πŸ’–

okay so, the StringObject class is used to derive subclasses that use the String managed memory pool for all space allocations, and it does that by overriding the new and delete operators. literally that's the whole vibe. you inherit, you get pool-allocated objects. iconic.

⚠️ but listen β€” due to size limits, StringObject should not hold very large objects. no giant objects in here bestie, the pool said no πŸ’€

Author

David Sugar dyfet@ostel.com

Objects managed in reusable String memory pools 🌈


🌟 Member Function Documentation 🌟

πŸ’œ void ost::StringObject::operator delete (void * obj)

Delete object from string managed space. that's it, that's the function. it frees your object back into the string managed space, periodt. πŸŽ€

πŸ’œ void* ost::StringObject::operator new (size_t size)

Create a new object in string managed space. hand it a size, get back space from the pool. slay. ✨


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for GNU CommonC++ from the source code. (not me writing fanfic, the robots did it πŸ™ˆ)


and that's the whole page bestie!! this one came out of GNU CommonC++, dated Sun Dec 27 2020 β€” go allocate something cute in a memory pool, ily, bye πŸ’–πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from