Name
OpenResourceMonitor -- open Hollywood's resource monitor (V4.5)
Synopsis
OpenResourceMonitor([table])
Library
object

Function
This function will open Hollywood's inbuilt resource monitor. The resource monitor will display a list of all resources that Hollywood has currently in memory. The list is updated several times per second so it is always up to date.

The resource monitor is very useful to make sure the memory management of your script is correct. Although Hollywood features resource tracking and will automatically deallocate all resources when it terminates, it is still important for bigger projects to keep an eye on their resource management because otherwise, your program will consume more and more memory. If you do not keep an eye on your resources, it can often happen that the longer your program runs, the more memory it will consume, and that can lead to trouble.

Hollywood's resource monitor conveniently allows you to keep an eye on your resources. If you have the resource monitor always open while you develop, you will easily notice if there is a resource problem somewhere. For example, if you notice that brush or layer numbers are steadily increasing while your script runs, you should be alarmed and it is likely that there is something wrong with your code which you need to fix.

Starting with Hollywood 11.0, this function accepts an optional table argument that allows you to configure some options for the resource monitor:

FontSize:
The font size that should be used by the resource monitor. This defaults to 8. (V11.0)

Width:
The window width for the resource monitor. This defaults to 200. (V11.0)

You can also enable the resource monitor directly at startup by using the -resourcemonitor console argument.

To close the resource monitor, simply close its window or just call the CloseResourceMonitor() function.

Inputs
table
optional: table containing further options (see above) (V11.0)

Show TOC