Legacy:GarbageCollect
From Spherical
GarbageCollect invokes SpiderMonkey's garbage collection routine, which will destroy any unused objects, freeing their memory.
Usage
GarbageCollect();
Notes
GarbageCollect will usually not be needed for most games. You should consider using it if your game creates and destroys a lot of objects in a short space of time and appears to be taking up more memory than it should. In this case, adding a call to GarbageCollect may help.