In my RapaGUI app I'm having an <image> widget that will always display my brush #1. So I'm loading an image into brush #1 and later overwriting it with another image. Now I'm concerned about memory consumption and garbage collection: is it advisable to always call FreeBrush() first before loading the new brush #1?
Example:
Code: Select all
@BRUSH 1, "images/empty.png"
(...)
LoadBrush(1, "images/brush1.png")
(...)
LoadBrush(1, "images/brush2.png")
(...)
LoadBrush(1, "images/brush3.png")
(...)
Code: Select all
@BRUSH 1, "images/empty.png"
(...)
FreeBrush(1)
LoadBrush(1, "images/brush1.png")
(...)
FreeBrush(1)
LoadBrush(1, "images/brush2.png")
(...)
FreeBrush(1)
LoadBrush(1, "images/brush3.png")
(...)