Are you using strict? (should be done in any case as variable scope work different if not)
Perhaps you flushmem away local variables that your functions and methods still base on and where they run in null references. Especially as you say that you are manually killing references as well ...
With debug enabled, the line where the error appears should be more or less be shown (+- 1 line) and you should be able to pin the error down or at least find a hint where to start your error search.
Perhaps you flushmem away local variables that your functions and methods still base on and where they run in null references. Especially as you say that you are manually killing references as well ...
With debug enabled, the line where the error appears should be more or less be shown (+- 1 line) and you should be able to pin the error down or at least find a hint where to start your error search.