We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Infinite loop in UserDefault's destructor on iOS.
Infinite loop in UserDefault's destructor on iOS.
Bug #3457 [Closed]
We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Reproduce Step:
Invoking UserDefault::destroyInstance() on iOS.
Solution:
To prevent developer uses
delete UserDefault::getInstance()
, we need to make the destructor of UserDefault as private function.Therefore, developer could only use
getInstance
anddestroyInstance
. Anddelete UserDefault::getInstance()
will be forbidden.