I don't think there is anything wrong with multiple returns. You can try it, by rewriting your program with single return and test again.
Memory problems are some of the hardest to diagnose. In C/C++ there are tools like Valgrind, which instrument your code so it's easier to locate such problems and even they aren't 100% reliable in catching things. You can read
this thread for some discussions regarding similar problems. This thread also mentions an alternative implementation of the Memory class, which contains additional functions, like Memory.debugDumpHeap() and Memory.debugHeapStats(). I believe it's from Mark (cadet1620).
You can also post the code somewhere or send it to me to check.