Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Any way to check for open objects?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

muzishun
Senior Member

United States
1079 Posts

Posted - 04 August 2005 :  12:02:21  Show Profile  Visit muzishun's Homepage
I'm fairly confident in my code to a certain degree, but there's always that question of whether or not I properly closed and destroyed all those objects in the code. Is there any way to check at the end of a page what objects are still open or existing? I'm thinking something like a function that grabs a list of all the objects that are open or have been created and displays them. I have a feeling I'm going out on a limb here, but considering the amount of MODs that I've added to my forum and the amount of tweaking and recoding I've done, it would take DAYS to go through every file and check object by object.

However sure I am that all of my objects are properly closed and destroyed, there's always that nagging "what if".

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 04 August 2005 :  12:36:33  Show Profile  Send pdrg a Yahoo! Message
I believe IIS will destroy them at the end of the context scope anyway - unless you're writing in C++ you *should* be OK...

but I'm tired, and ready to be proved wrong ;-)
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 04 August 2005 :  17:42:48  Show Profile  Visit AnonJr's Homepage
According to Microsoft (feel free to worry about any comments prefaced with that statement ) When the script ends, any objects that have not been destroyed, will be taken care of. -I do remember seeing it somewhere on the MSDN site, but for the life of me I just can't seem to find it.

Having said that, I do listen to that same nagging feeling in my own code, and make sure that everything is properly taken care of... not to mention that Microsoft recommends it anyway... though I'm not quite about ready to hunt through all the code in the forum to solve it.

Does that help?
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 04 August 2005 :  17:53:23  Show Profile  Visit muzishun's Homepage
Yeah. I know the base code is well taken care of in terms of opening and closing objects, but I'm just worried about the tons of MODs that I've added, as well as my own custom code. It's not that I've noticed a drop in the performance of my forum, but I just have been starting to improve my coding habits and looking back, I'm not sure what things have been fixed and what haven't.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 08 August 2005 :  07:22:03  Show Profile  Send pdrg a Yahoo! Message
Right, I'm back and more awake now...

http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/asp/perf9ini.htm
has some tips about scoping your objects

IIS will manage closing your objects for you (although it is certainly better form to close them yourself), assuming you are opening them in the page scope as opposed to storing objects in sessions or application object. As the Snitz base code is solid, and your own code is good, you're probably fine, and wouldn't get much more from explicitly closing everything (as you'd then incur the overhead of iterating through the x.objects collection and closing them on every page/whatever).

my 2p - you'd probably get better bang for your buck by investing your time elsewhere or spending the equivelent cash on a bit more RAM ;-)
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 08 August 2005 :  13:21:22  Show Profile  Visit AnonJr's Homepage
quote:
I just have been starting to improve my coding habits and looking back, I'm not sure what things have been fixed and what haven't.

I know that feeling... and I've gone back and fixed a few things of my own (not forum stuff, but other pages).

quote:
my 2p - you'd probably get better bang for your buck by investing your time elsewhere or spending the equivelent cash on a bit more RAM


I'll buy that! No such thing as too much memory.
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 09 August 2005 :  04:09:31  Show Profile  Send pdrg a Yahoo! Message
quote:

I'll buy that! No such thing as too much memory.



Just think how my old copy of Psion Chess for the ZX81 (you may know it as the Timex 1000) - designed to run in 16k - would run on my new laptop...breathtaking!

http://www2.b3ta.com/heyhey16k/ for a singalong
Go to Top of Page

Ghostnetworks
New Member

95 Posts

Posted - 09 August 2005 :  04:58:32  Show Profile  Visit Ghostnetworks's Homepage
quote:
Originally posted by pdrg
http://www2.b3ta.com/heyhey16k/ for a singalong




That's it. I want every piece of hardware I ever threw out!
Oh the memories!!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07