8/9/2011 4:06:25 AM
Title:
How to make any class as singleton class in flex4?
Can anyone tell me how to make any normal class as singleton in flex 4?
like for example my class name is model. so how i will convert this class singleton pattern?
Please reply me as soon as possible.
8/10/2011 1:53:33 PM
Hi Priyanka,
Here is a code to define singleton class in flex
private static var _instance:anyModel;
public static function getInstance():anyModel
{
if(_instance == null)
{
_instance = new anyModel();
}
return _instance;
}
8/11/2011 12:07:55 AM
Thank you Shirdhar,but I already got the solution.