Name
moai.FreeImage -- free brush in image cache (V1.2)
Synopsis
moai.FreeImage(id)
Function
This function can be used to free a brush in RapaGUI's internal image cache. You have to pass the identifier of the brush that should be freed. Alternatively, you can also pass -1 to this function to free all brushes in RapaGUI's internal image cache.

You must make sure that the specified brush is no longer used by any widgets in your GUI before you call this function. Note that under normal conditions it is not necessary to call this function because normally all brushes are freed automatically by RapaGUI. Under certain conditions, however, it can be useful to call this function.

RapaGUI caches all Hollywood brushes that you use as images in your GUI. That is why when you try to use a Hollywood brush in your GUI a second time, it will just be loaded from RapaGUI's internal image cache for performance reasons, regardless of the brush's current contents inside Hollywood. This can lead to unwanted behaviour in case you have updated your brush's graphics in the meantime and you want RapaGUI to use the updated graphics. In that case, you first have to free the brush in RapaGUI's internal image cache by using this function. When you pass the brush to RapaGUI again then, it will be re-created from the brush's current state and it will be cached anew.

Inputs
id
identifier of brush to free or -1 to free all brushes

Show TOC