want to remove unused (Let us say for 10 min) objects from hashtable.
Hi Java People,
i want to implement catching mechanism using the Hash-table class. Here's how: When i need an object, first check to see if it's in the Hashtable. If the required object isn't there, create a new instance of it and put it into the Hash-table. if it is available i will reuse that object.
and if the object is no longer in use, i want to remove the object from hash-table.
any suggestion would be highly appreciated.
Re: want to remove unused (Let us say for 10 min) objects from hashtable.
Maybe a WeakHashMap object can be of help.