This is not really a ZC specific question but I am unsure of how this works in php.

I normally explicitly call destructors for other OOP languages. But in my Admin ZC tool, I only need the class while the tool is running (page is active). So I can instantiate the object when the page loads. However, I do not see any type of mechanism for knowing when the scope of the page is gone. All you have to do is switch to another page. I can register a shutdown function, but again, I am not sure when that executes. I know that the destructor should execute when nothing else references it...would that be the case if you move to another menu item in the Admin and leave that tool's page?

I do not want to end up with memory leaks. Any input is greatly appreciated.

Thanks!