Memory which got allocated by the engine itself (let's say via WED entities or ent_created entities) does get freed automatically.
However, when you do more fancy stuff such as
my.skill90 = txt_create(...);
my.skill91 = allocate_pathfinding_data(...);
abd so on, you will need to release the memory manually, even on level change. Check out the on_ent_remove event.