Just in case you don’t have Clarion Enterprise Edition here is a neat little incantation that you can use to kill the output exe process before the build occurs:
taskkill /f /im $(OutputName).exe /fi "memusage gt 40"
Put that in your main project pre-build command window and voilà!