cocos2d/cocos2d-x — pull request #4571 by dumganhar (2013-12-20 06:08:29+00:00)
Title: closed #3457: Fix of UserDefault. Infinite loop in UserDefault's destructor on iOS. The destructor of UserDefault is private now.

## 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 and destroyInstance. And delete UserDefault::getInstance() will be forbidden.

```
UserDefault* UserDefault::getInstance()
{
...
if (! _userDefault)
{
_userDefault = new UserDefault();
}

return _userDefault;
}

void UserDefault::destroyInstance()
{
CC_SAFE_DELETE(_userDefault);
}
```