cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <...@onclave.com>
Subject [Q] SunRise AuthAction nitpicking...
Date Tue, 13 Aug 2002 15:00:30 GMT
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?

Per


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message