schwankieog
Programmer
i wrote a screensaver using mfc. all that it does is ouput lines at various locations on the screen in mathmatical patterns. i do not allocate any dynamic memory during the program, and reset the only counter at 15. I do declare two CPen pointer variables, but they are at function scope. I also seed the random number generator every 15 times through the loop by srand(time(0)+rand()%20); just to randommly set the color of the lines. Neither of these should effect the system resources nor should the rest of the program which is just moving to locations and drawing lines. The screensaver compiles and runs fine for approx. 15 minutes. at 15 minutes the saver freezes and i receive an error telling me there are not enough system resources available. the system does respond then to my moving the mouse or a keystroke by shutting down the screen saver and returning to windows. I am using XP so i check the processes running and it is not, and after i shut down the screensaver the system returns to normal. Thanks for reading m,y description of the problem and if any one has any idea why this is happening please let me know.