pH Reference Guide

The "ph_free" Function #

Syntax:

ph_free();
Argument Type Description
N/A N/A No arguments

Description:

Frees all memory occupied by placeholders generated with ph_create.

As placeholders are cached and re-used, typically only a small amount of memory is occupied when using pH. However, if a large number of unique placeholders are no longer needed, it’s a good idea to run this script when switching rooms or destroying the object which formerly used them.

Note that running this function will break any variables referencing placeholders. On the other hand, running ph_create in sprite functions directly will simply regenerate sprites when they are needed, and ph_free will appear to have no effect. As such, in both cases it is important only to run ph_free when placeholders will no longer be referenced.

Example:

room_goto_next();
ph_free();

 

Last updated on August 14, 2018
Suggest Edit