В общем то копнув глубже я обнаружил что проблема не в памяти а в так называемых GDI Objects. Собственно для решения проблемы нужно выполнить следующие действия:   "Once any single process hits 10,000 GDI Objects, it’s terminated. This is the default limit defined by Windows that a single process can reach. There’s a registry tweak that can change this; a single process can max out at 16,384, while the system wide max for all processes is 65,536; edit the HKEY_LOCAL_MACH