Ryan Heldt wrote:
> The objects I am copying from are persisted in the session scope. I would
> like to be able to read from these objects at runtime without having to lock 
> them all over the place. Does creating a pointer in the request scope to an 
> object in session absolve you from locking? I'm not sure, and to be honest, I 
> haven't found a lot of information either way on the issue, so copying the 
> object seems to be playing it safe, no? 
As I pointed out previously one NO LONGER NEED to lock reads and other 
non-race condition writes to session, application and server scopes.  
This problem was resolved several version ago.  One could quite happily 
and safely access the session persisted objects directly if that is the 
only requirement for all this extra work and memory use.  You will be 
doubling the memory requirement of each and every object you duplicate 
from the session scope to the request or similar scope. 

But there have been some interesting thoughts on copying objects when 
one does have a need to do this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292278
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to