Brightsign BrightScript 2 Reference Guide Bedienungsanleitung Seite 19

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 59
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 18
19
Garbage Collection
BrightScript will automatically free strings when they are no longer used, and it will free
objects when their reference count goes to zero. This is done at the time the object or
string is no longer used; there is no background garbage collection task. This results in
very predictable “garbage collection” -- there are no unexpected stalls in execution.
A “mark and sweep” garbage collection is run after a script executes, or can be manually
forced to run via the debug console. There is currently no way to run it from a script,
and it doesn‟t currently run in the background. Its purpose is to clean up objects that
refer to themselves or have other circular references (which are not managed by the
normal reference counting garbage collection).
i=roCreateObject(“roInt”)
j=I „ reference incremented
i=invalid „ reference decremented
j=0 „ roInt just free‟d.
Seitenansicht 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 58 59

Kommentare zu diesen Handbüchern

Keine Kommentare