History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-908
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Marcus Griep
Reporter: Marcus Griep
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

SingletonAttribute doesn't protect against deserialization instatiating multiple singletons

Created: 26/Oct/07 01:57 PM   Updated: 26/Oct/07 01:58 PM
Component/s: Boo.Lang.Useful
Affects Version/s: 0.8
Fix Version/s: 0.8.1

Time Tracking:
Not Specified


 Description  « Hide
Take this example. Currently, if a singleton is passed in as a1, upon deserialization, there will be two singletons. This is bad behavior.
private def SerializeAndDeserialize(a1 as object):
	formatter = BinaryFormatter()
	using stream = MemoryStream():
		formatter.Serialize(stream, a1)
	
		stream.Seek(0, SeekOrigin.Begin)
	
		a2 = formatter.Deserialize(stream)
	return a2


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marcus Griep - 26/Oct/07 01:58 PM
Revision 2742