Legacy:GarbageCollect

From Spherical
Revision as of 02:32, 2 June 2013 by Apollolux (talk | contribs) (filled)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GarbageCollect invokes SpiderMonkey's garbage collection routine, which will destroy any unused objects, freeing their memory.

Contents

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.


API:Script/navbox