You can do "System.gc()", but it's almost always a Really Bad Idea. About the only place I can think of where it's acceptable is in a realtime graphics app (like a game) where you need to make sure that the GC runs when it's not doing anything critical to minimize the runtime doing GC at a bad time.
|