global vs local (variables and lists) by byte consumption JAVA
===

I' trying to create a web site and some times i took the PermGen exception. So i start searching for ways to reduce the amount of the created objects and also to reduce the memory consumption. I read some articles. But i'm not sure about some things. For example is better to declare lists outside of a method(global), or to create them into a method? What's the difference in terms of memory consumption at this case? If i declare them as local that means that after the use the garbage collector will collect them and thus will release space at the heap? Can anyone propose me ways to reduce more the memory consumption and the amount of the create objects(is the @Autowired better way to declare on object)?