I run some sites on my computer as a test bed, as I'm sure most people do. my computer was being a little akward last night, so i had a look at the task manager and was surprised to see that "Apache.exe" was using over 300 megabytes of memory, apparently. Now i'm sure most of that had probably been chucked into a page file, but it did get me to thinking...
Are there steps that i should be taking to make sure that my sites arent necessarily wasting resources? Should, for example, I always close database connections at the end of a page or site? If so, how? Should I be using pconnect (as i have occasionally) to connect to the DB or not? And what about variables and the like - should i be unsetting them or destroying them when i'm done with them?
The sites arent terribly complicated - no huge array's or anything. It's just an online seat reservation system for a school play, so i was a little surprised to see the resources being consumed. Help me to become a more efficient coder!