Basically, I'm using a FormList to store a list of items, but I need to store the item's quantity as well. So far my workaround has been to store an instance of the item for every count, but this is disgustingly inefficient, and has caused noticable slowdown when working with a large collection of items. I've considered using an array of ints to store the counts, but the problem here is that I would need a non-fixed-length array.
I could use new to reallocate a new array each time I need it bigger, like I would in C++, but as far as I can tell there's no "delete" equivellant. Does Papyrus have garbage collection?