Hi,
Bills conclusion that SuppressFinalize is not required implies that
Samir Bajaj's statement regarding has Singleton code in
http://msdn.microsoft.com/msdnmag/issues/01/07/patterns/patterns.asp
is that "all you need to do in the C# version is make sure you have a
live reference to the singleton object for as long as it's needed." is
incorrect.


btw. Any idea why the Rational XDE generated code for a singleton has a
public constructor? 

public class Singleton
{
        public void singletonOperation()
        {
        }

        public static Singleton getUniqueInstance()
        {
                if(uniqueInstance == null) 
                { 
                        uniqueInstance = new Singleton();
                }
                return uniqueInstance;
        }

        public System.Object getSingletonData()
        {
                return singletonData;
        }

        public Singleton()
        {
        }

        static Singleton uniqueInstance;
        System.Object singletonData;
}

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to