I don't actually see any particular reason to use a singleton in this case: You are parsing a file, and want to store it someplace. There is no particular reason (from what you've said) why parsing a different file, or even reparsing the file should be prevented. (Besides the fact of memory useage/speed, which to me isn't a reason for a singleton, just a reason to keep using the same object.)
Basically, it's extra complexity to prevent future uses. I don't see why either would be something you want.
In reply to Re^3: Are global variables "bad"?
by DStaal
in thread Are global variables "bad"?
by jpearl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |