I know that we can monitor the memory usage when debugging by using Debug.GC(). But is there a way the program itself can check how much memory is left, and act accordingly?
The reason for this is because the HTTPS calls in my program is leaking memory, and I want it to reboot whenever the amount of memory left dropped below a certain threshold.
Btw, is there any workaround to the memory leak (https://netmf.codeplex.com/workitem/2005), of EMX package 4.2 (https://www.ghielectronics.com/support/netmf/sdk/8/netmf-and-gadgeteer-package-2013-r3), because rebooting is really just an awkward temporary fix.
Thanks for all your help in advance !