Reputation: 197
How to make sure that when unloading a module form a page will free the memory used? How ZF2 ensure that object created while loading a particular module is unset when i load another module? How can we check that?
For example i have two module
Application module and Album module
zftest -> load application module
zftest/album-> load album module
When switch from one link to another ? how can i make sure that no unused object are there in the memory space .
Upvotes: 0
Views: 143
Reputation: 33148
I really wouldn't worry about this. ZF modules are very lightweight, and the classes they use are loaded on demand, so it's probably only the Module.php
class that'll be loaded on every request.
Memory usage is rarely an issue for a typical PHP application. If you really think this might be a problem for your app, measure the current memory usage first to see whether this is the case.
Upvotes: 1