Runtime

From Xojo Documentation

Revision as of 03:31, 29 July 2019 by Gperlman (talk | contribs)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Module

Returns information about the current state of the runtime environment. This information can be useful for debugging purposes.

Properties
MemoryUsed fa-lock-32.png ObjectCount fa-lock-32.png ObjectRefs fa-lock-32.png
ObjectClass fa-lock-32.png ObjectID fa-lock-32.png


Methods
IterateObjects

Examples

The following code displays the properties related to individual objects in a multicolumn ListBox and the total amount of memory used in a TextField:

Var lastObjectIndex As Integer = Runtime.ObjectCount - 1
For i As Integer = 0 To lastObjectIndex
Listbox1.AddRow(Runtime.ObjectID(i).ToString)
Listbox1.CellValueAt(ListBox1.LastAddedRowIndex, 1) = Runtime.ObjectClass(i)
Listbox1.CellValueAt(ListBox1.LastAddedRowIndex, 2) = Runtime.ObjectRefs(i).ToString
Next
TextField1.Value = Str(Runtime.MemoryUsed)

See Also

ObjectIterator class; System module.