the-moisrex / webpp

C++ web framework | web development can be done with C++ as well.
https://t.me/webpp
MIT License
134 stars 9 forks source link

Harmful Feature (or not?): GC on request sent #552

Open the-moisrex opened 3 months ago

the-moisrex commented 3 months ago

How freaked out everyone would be if I garbage collected some specific classes after each user's request is sent?

Why you ask?

  1. Users may want to make a couple of mistakes
  2. It gives me the opportunity to use the user specified (or my default) custom allocator in there.
  3. Delay delete syscalls (and also mallocs if the allocator wants it) to idle time
  4. Statistics and Customizations
  5. It looks cool? maybe?

The tweet CE Link

Prerequisites

What do you think? Is it a good idea to have a GC?