I've got some problem with static pointers and variables in Bada. First I tried to create singleton class and did something like this: Header:
static Session *getInstanceOf();
private:
static Session *instance;
Source:
Session* Session::getInstanceOf(){
if (instance==NULL){
instance=new Session();}
return instance;
}
But application crashed without any error message. Then I tried creating static class field and returning it by:
ArrayList* User::GetUniv()
{
return &Universities;
}
But it had the same result. Do you have any idea why is it so? Thanks for any help.