On Thu, 24 Aug 2006 22:04:21 +0100, <redefined.horizons@gmail.com> wrote:
I've done that, but the data sets I'm working with are huge, and I need
find a way to access the information in the objects from the hard disk,
one at a time.
I thought objects created from a class definition with only methods
would have a very small method footprint.
Will I reduce RAM usage by creating hundreds or thousands of objects
from a class that only contains method definitions?
If there are no fields whatsoever, then there is nothing to be gained by
having more than one instance of the class (unless its methods are not
re-entrant and you need concurrent invocations, in which case you could
consider pooling multiple instances). If you do put your data on disk,
you could use just one instance of the class to process all of your data.
Not knowing anything about your program, is the Flyweight Pattern
something that might help?
primitive arrays. It all depends.