Hi,
i noticed that whenever the class FolderMan is used the function instance() is called to create an instance of the class, so when i went the the FolderMan class i found the following lines of code:
FolderMan *FolderMan::_instance = 0;
ASSERT(!_instance);
_instance = this;
FolderMan *FolderMan::instance()
{
return _instance;
}
im not an expert in C++ but that code looks a lot like singleton, is that correct?
and if i wanted to use the class “FolderMan” anywhere else in the code i just need to follow the same approach which is: FolderMan *folderMan = FolderMan::instance();
correct?