posted 22 years ago
You might want to look at exactly where the memory is being consumed. If your class doesn't consume much memory, it doesn't matter. If it allocates some large objects to do its work, you might implement a "release" method which sets those objects to null and frees up whatever else needs to be freed until the next time your class is used.
This would save you the overhead of having to allocate and release the object in the code which invokes it, and would still keep your memory usage down when the application is idle.