> Using enum can be very useful, but I wouldn't use it for AAs at all, and I'd
> be leery of using it for much in the way of arrays other than string literals
> (since the string literals should avoid the memory allocations that other
> array literals get). It's fine most other stuff, but for those items, you need
> to be very wary of it or risk lots of unnecessary GC allocations.

I guess the rule to follow is not to use enum for anything with lots
of allocation.

Why do string literals have less memory allocations?

Reply via email to