From: "Abinoam Jr." Date: 2011-02-28T08:02:14+09:00 Subject: Re: Ensuring uniqueness of an object at creation time >> So, if I raise an exception at initialize point the object was already >> allocated. > > Yes, but it will be garbage-collected later. You're right. In my specific piece of software I think this will not a problem. But, if it's a huge one, the computational cost of allocating and deallocating can be important. >  # non-threadsafe version Thank you for advising me to always think in "thread-safe" way. > Why is it important in your application for your objects to have the > singleton behaviour like Symbol? What bad things would happen if there > were two objects representing the same message? Look, there's some problems I have circumvented by defining a (class)#== method. The "==" method relied on the comparison of the instance variables ( @message, for example ). So, even if there are 2 instances representing the same message they would be considered equal to each other throughout the software. But... again, I thought it could a little ugly code. Abinoam Jr.