@dheerajjoshim
Like I said, from what I can remember (I will have to read it again), a web-server uses a continuous SAPI, that is, once the server is started, any memory it uses is not reclaimed until the server is stopped/restarted, unless the memory is explicitly freed by the server/extension. So, if a C extension uses some memory when the server cycle starts and doesn't free it at the end of a request (I will explain about this more when I have re-read the book), the memory is retained.
The CLI (terminal/command-line) SAPI is started and stopped with each request - therefore, Zend frees up it's memory when the cycle ends - when the script you're executing ends.
But don't quote me on any of that.
Mark.
P.S. It's hard to explain something when you don't fully remember / understand what you read - so, hopefully, I'll make more sense when I have read it again.