Garbage Collection

BrightScript automatically frees strings when they are no longer used, and it will free objects when their reference count goes to zero. This is carried out at the time the object or string is no longer used; there is no background garbage collection task. The result is a predictable garbage-collection process, with no unexpected stalls in execution. 

Objects may enter a state of circular reference counting: Objects that reference each other will never reach a reference count of zero and will need to be freed manually using the RunGarbageCollector() method. This method is useful when destroying old presentation data structures and creating a new presentation.