thanks for ur reply. in fact i experience a memory leakage problem when i keep clicking and refreshing a list. stuff in the list will be stored in cache by the saveState option.
after i click to refresh that list for serveral times, the app hanged w/ outofmemory exception. I wonder if the cached list objects cannot be completely remove and GC in the next cycle. any idea on what's happening? Werner Punz-2 wrote: > > Dellee schrieb: >> Hi all, >> I am new to myFaces and I think a little bit confusing on the >> saveState >> option. >> When using the saveState, will it keep referencing the beans that it >> pointed >> to ? >> if yes, will this cause a memory leak coz the pointed bean should be died >> and GC after the server method finished. >> However, as someone is pointing to it (by saveState), so it still alive >> and >> won't be collected when GC start. >> what do u think ? >> am i mis-understanding something ? >> > First of all I am moving this into the users list. > The devs list is for development discussions on myfaces. > > Yes you misunderstand something: > saveState uses the jsf internal save restore mechanisms, hence > every object which is referenced by safestate is serialized and > deserialized at every request, so no memory leak situation theoretically > can occur > unless the serialisation happens into the session > (this is app server dependent) > > besides that once you reach a page where savestate is not referenced > anymore the object is basically dropped from the save restore cycled > and fed into the garbage collector at the next save cycle. > > > -- View this message in context: http://www.nabble.com/Re%3A-saveState-will-cause-memory-leak--tf3186226.html#a8858615 Sent from the MyFaces - Users mailing list archive at Nabble.com.

