Per Kreipke wrote: > > I see most actions returning empty maps by using either the EMPTY_MAP > constant from the AbstractAction base class or creating their own > unmodifiable map using Collections. > > But in AuthAction, the map is returned via: > > map = new HashMap(); > > as does SunRise.createMap() > > I'm not a Java expert so I just want to be sure that it's not a > memory leak. > I'm sure it gets garbage collected but isn't it cheaper to return a final > static variable (EMPTY_MAP), especially since it happens on every request? > It's not a memory leak - but it's a "performance killer". Yes, these two places were overseen. I will fix this asap.
Thanks for spotting these. Carsten --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>