2008 Jan 14 5:22 AM
I have a singleton class. It has some methods.
- I want to know whether I can call a method of this class simultaneously from two different places.
- I have a local table in this class, I would like to know when this object gets deleted(garbage collected).
Thanks and regards,
Jashua
I have a singleton class. It has some methods.
- I want to know whether I can call a method of this class simultaneously from two different places.
- I have a local table in this class, I would like to know when this object gets deleted(garbage collected).
Thanks and regards,
Jashua
2008 Jan 14 5:54 AM
Hello Jashua
Why should it not be possible to call methods of this class "simultaneously"?
For example, if you have a static method GET_INSTANCE and the singleton instance has not been created yet the first call will create the instance whereas the second call will simply retrieve the already created instance.
If the local table is an instance attribute it will vanish as soon as you do not have any reference to your singleton anymore.
Regards,
Uwe