Only way to stop this from happening is, cut down other processes while debugging your application, or increase your RAM size by adding a new RAM to your machine. Or try to reboot your machine and then start this application - by restarting your RAM will be free for this application, unless your other softwares take up all of the space before your application.
System.OutOfMemoryException[
^] is raised when there is not enough memory (RAM space) to execute the instructions in your application.