I have a Tab based Multi-Document-Interface application and I have a single form, object of this single form is a singleton only for that particular Tab. For other Tab, I need to have another object of the single form which is a singleton object only for that tab.
I have implemented singleton patter but same object is used by all the tabs.
Edit: Each TAB is responsible for Monitoring activities with one customer and SingleForm hosts all controls. When user move to other TAB which is monitoring another customer, my singleForm shows the previous customers details.
Any solution. please share.
thank you,
You cannot use the Singleton pattern here. The Singleton pattern ensures that there is only one object, global to your application.
(If you elaborate a bit, e.g., why you are using a singleton in the first place, you might get more detailed answers.)