Memory leaks occur sometimes when having faulty triggers and is usually because of a lack of variables. I think there is a tool out (I think somewhere on wc3campaigns.net) that can fix those problems. People who deal with JASS scripting can tell you more about that. Someone correct me if I'm wrong.