I found some code at the following url (http://documentation.xojo.com/index.php/Runtime) and inserted in the previous button action event. Here are the results of pressing the button four times and opening the same png picture each time. The first number is the memory in the text filed, while the reminder are from the listbox. The first group of numbers are from the IDE and the second are from a compiled app.
Dim PickFile as FolderItem
PickFile = GetOpenFolderItem("")
If PickFile <> Nil then
ListBox1.DeleteAllRows
TextField1.Text = ""
PickFilePic = Picture.Open(PickFile)
Dim lastObjectIndex As Integer = Runtime.ObjectCount - 1
For i As Integer = 0 To lastObjectIndex
Listbox1.AddRow(Str(Runtime.ObjectID(i)))
Listbox1.Cell(ListBox1.LastIndex, 1) = Runtime.ObjectClass(i)
Listbox1.Cell(ListBox1.LastIndex, 2) = Str(Runtime.ObjectRefs(i))
Next
TextField1.Text = Str(Runtime.MemoryUsed)
Else
Return
End If
IDE:
-
661300928
171100675 Array 1
171100867 Picture 1
171100803 Picture 1
7403715 FolderItem 1
8310451 Delegate 1
8356307 TextField 1
8126787 Listbox 5
8158195 TextField 2
8168067 Delegate 1
8158387 PushButton 3
26028883 Window1.Window1 3
5036691 MenuItem 1
5037251 MenuItem 1
5037475 MenuItem 1
5038019 MenuItem 1
5034307 MenuItem 1
5035827 MenuItem 1
5034723 MenuItem 1
5090563 MenuItem 1
5034883 MenuItem 1
5031571 QuitMenuItem 1
5090435 MenuItem 1
5086899 MainMenuBar.MainMenuBar 11
5088963 MDIWindow 1
5085987 App 2
-
661381136
7855427 Array 1
7853907 Picture 1
7618115 Picture 1
25934531 FolderItem 1
29531859 Delegate 1
8356307 TextField 1
8126787 Listbox 5
8158195 TextField 2
8168067 Delegate 1
8158387 PushButton 3
26028883 Window1.Window1 3
5036691 MenuItem 1
5037251 MenuItem 1
5037475 MenuItem 1
5038019 MenuItem 1
5034307 MenuItem 1
5035827 MenuItem 1
5034723 MenuItem 1
5090563 MenuItem 1
5034883 MenuItem 1
5031571 QuitMenuItem 1
5090435 MenuItem 1
5086899 MainMenuBar.MainMenuBar 28
5088963 MDIWindow 1
5085987 App 2
-
661947472
25749315 Array 1
26085123 Picture 1
25738067 Picture 1
4234083 FolderItem 1
4774227 Delegate 1
8356307 TextField 1
8126787 Listbox 5
8158195 TextField 2
8168067 Delegate 1
8158387 PushButton 3
26028883 Window1.Window1 3
5036691 MenuItem 1
5037251 MenuItem 1
5037475 MenuItem 1
5038019 MenuItem 1
5034307 MenuItem 1
5035827 MenuItem 1
5034723 MenuItem 1
5090563 MenuItem 1
5034883 MenuItem 1
5031571 QuitMenuItem 1
5090435 MenuItem 1
5086899 MainMenuBar.MainMenuBar 46
5088963 MDIWindow 1
5085987 App 2
-
661766496
4550467 Array 1
4542515 Picture 1
4543315 Picture 1
171089955 FolderItem 1
26280739 Delegate 1
8356307 TextField 1
8126787 Listbox 5
8158195 TextField 2
8168067 Delegate 1
8158387 PushButton 3
26028883 Window1.Window1 3
5036691 MenuItem 1
5037251 MenuItem 1
5037475 MenuItem 1
5038019 MenuItem 1
5034307 MenuItem 1
5035827 MenuItem 1
5034723 MenuItem 1
5090563 MenuItem 1
5034883 MenuItem 1
5031571 QuitMenuItem 1
5090435 MenuItem 1
5086899 MainMenuBar.MainMenuBar 62
5088963 MDIWindow 1
5085987 App 2
Compiled App:
-
657391152
4377587 Array 1
4985395 Picture 1
5001875 Picture 1
6831667 FolderItem 1
7195859 Delegate 1
4362819 TextField 1
43239955 Listbox 5
43240531 TextField 2
43241187 Delegate 1
42991763 PushButton 3
5297075 Window1.Window1 3
5330211 MenuItem 1
5330707 MenuItem 1
5327091 MenuItem 1
5327379 MenuItem 1
5327747 MenuItem 1
5328163 MenuItem 1
5328739 MenuItem 1
5325955 MenuItem 1
5325827 MenuItem 1
5354627 QuitMenuItem 1
4444259 MenuItem 1
4445875 MainMenuBar.MainMenuBar 11
4446067 MDIWindow 1
4445955 App 2
-
658092896
43987571 Array 1
5021251 Picture 1
5042211 Picture 1
43516115 FolderItem 1
6251619 Delegate 1
4362819 TextField 1
43239955 Listbox 5
43240531 TextField 2
43241187 Delegate 1
42991763 PushButton 3
5297075 Window1.Window1 3
5330211 MenuItem 1
5330707 MenuItem 1
5327091 MenuItem 1
5327379 MenuItem 1
5327747 MenuItem 1
5328163 MenuItem 1
5328739 MenuItem 1
5325955 MenuItem 1
5325827 MenuItem 1
5354627 QuitMenuItem 1
4444259 MenuItem 1
4445875 MainMenuBar.MainMenuBar 31
4446067 MDIWindow 1
4445955 App 2
-
658424496
43998643 Array 1
43805043 Picture 1
43987859 Picture 1
5547379 FolderItem 1
4385571 Delegate 1
4362819 TextField 1
43239955 Listbox 5
43240531 TextField 2
43241187 Delegate 1
42991763 PushButton 3
5297075 Window1.Window1 3
5330211 MenuItem 1
5330707 MenuItem 1
5327091 MenuItem 1
5327379 MenuItem 1
5327747 MenuItem 1
5328163 MenuItem 1
5328739 MenuItem 1
5325955 MenuItem 1
5325827 MenuItem 1
5354627 QuitMenuItem 1
4444259 MenuItem 1
4445875 MainMenuBar.MainMenuBar 48
4446067 MDIWindow 1
4445955 App 2
-
659011072
43755667 Array 1
43539155 Picture 1
43747171 Picture 1
5814355 FolderItem 1
6902707 Delegate 1
4362819 TextField 1
43239955 Listbox 5
43240531 TextField 2
43241187 Delegate 1
42991763 PushButton 3
5297075 Window1.Window1 3
5330211 MenuItem 1
5330707 MenuItem 1
5327091 MenuItem 1
5327379 MenuItem 1
5327747 MenuItem 1
5328163 MenuItem 1
5328739 MenuItem 1
5325955 MenuItem 1
5325827 MenuItem 1
5354627 QuitMenuItem 1
4444259 MenuItem 1
4445875 MainMenuBar.MainMenuBar 64
4446067 MDIWindow 1
4445955 App 2