1. The engine does on a new level_load or as soon as you use ent_remove.
2. To create entities you should use ent_create and nothing else. If the memory continously goes up there is something wrong with you code. Please show it.
3. You can use gamestudios debug panel. This will give you far more detailed overview.
4. I'm not sure I understand that question. You want to remove the material? You can use ptr_remove. For removing a bitmap as well.
5. level_load removes everything from the previous level, i.e. all entities, geometry etc. Script create content will remain in memory, e.g. bitmaps, sounds etc.
6. No, because you did't tell us what error.
7. What is settriggerflag?