ost::StringObject(3)
πΈ 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
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms