This pattern allows me to avoid new, delete, malloc, and free except in the container's constructor / destructor. If the containers work, it's impossible to leak or screw up references because the stack frame encapsulates. Any similar tricks for pure C? Always gets me nervous.
-
-
-
Basically, outside of containers, it's a bunch of methods that are stateless which call other methods that are stateless. Data only in through parameters. Data only out through parameters or return value. No mutation. No globals (except for logging). Etc.
Keskustelun loppu
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.