I have found that I am able to eliminate my memory leak issue by using ent_purge on a few entities before a level_load.

Using this causes an E1515 error to pop on some occasions. However, in the published version of the game these errors do not pop up.

Is this safe to use, or will it introduce other problems down the line?