All these variables are references to the same object, so they occupy memory only once (and you need a bit of memory for each pointer).
If you want to know what is using memory, run an xdebug session, and you'll know it exactly.

[eluser]WanWizard[/eluser]
These references are added when you load the model.

In the Model controller (the one you extend) there's a _assign_libraries() method that is called after instantiating the model class, and that will assign all loaded CI libraries to the model so they can be accessed via $this.

[eluser]mddd[/eluser]
For instance, I have a site that allows the user to search on different parameters.
I created a model to analyze the uri to see which search options are active.
There's a reason to want to look at the URI in a model.

[eluser]WanWizard[/eluser]
There is an encypt library that I need for all queries that involve encrypted of hashed fields. Do I have to replicate the same methods in all my models, or use a generic library?

As with many other elements of programming: the fact that something exists or something is possible doesn't mean you have to use it. Take for example the CI program guidelines. Not enforced, but recommended.
If you don't like using libraries in your models, then don't. But don't complain the framework allows you to use them.

If you need a strict framework to keep you on the right path, I guess as a programmer you're not mature enough.

[eluser]BrianL[/eluser]
Like all things in life it is only as fast and as good as the skill of the programmer. It is also only as secure as the programmer.

For example, many developers turn on xss_clean permanently because they don't want to go through the bother of filtering output. But this is actually inefficient and wrong, since xss should be removed on output not removed from everything. Text must be processed before output and should not be blindly trusted just because it comes from a database. Of course CI lets you do whatever you want. Another example is htmlentities. Many developers do not understand paramaterized queries so they use htmlentities on everything, fearful of certain characters, and write manual SQL queries. Of course they are really attempting to mask their lack of understanding of character encoding and should be using ESAPI instead of inventing their own security controls, since hackers are quite devious and can not only double encode but bury encoding and exploit PHP library vulnerabilities (for example there was a shocking vulnerability in htmlentities allowing remote code execution just a couple PHP versions ago, and htmlentities is vulnerable if you don't specify the encoding). But again CI lets you do whatever you want. Prepared statements are the way to go but most developers don't understand prepared statements so CI makes available Active Record. Of course every single day there's people posting about manual SQL rather than using Active Record and they probably disable Active Record to get more efficient without actually realizing they are writing totally insecure code.

If you think CI is slow check out some bloated frameworks like CakePHP.