sorry, the code i posted is flawed!

if you're using commands within the engine such as prt_remove these will be invalid...

only use such commands if you know what you're doing with memory when you know what GS thinks it's doing with memory....