Memory issues on Windows and Linux