They provide slightly more functionality than structs
Not really. The only difference between a structure and a class is that by default, a structures members are public and it also publicly inherits it's base class.
When creating a class using
new, it will not be deleted when it goes out of scope. You must
delete it some point when you're finished with it, or you will leak memory.
thingHandler TH = new thingHandler(20);
TH.handleThings();
TH.things += 10;
delete TH;
You can also create your class with automatic storage duration, which will handle cleanup automatically when it goes out of scope.
thingHandler TH(20);
TH.handleThings();
TH.things += 10;