mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Minor memory management fix.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31932 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
723f5db782
commit
e0418b2822
1 changed files with 4 additions and 6 deletions
|
@ -85,8 +85,8 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
_behavior = _defaultBehavior;
|
_behavior = _defaultBehavior;
|
||||||
_locale = [NSLocale currentLocale];
|
_locale = RETAIN([NSLocale currentLocale]);
|
||||||
_tz = [NSTimeZone defaultTimeZone];
|
_tz = RETAIN([NSTimeZone defaultTimeZone]);
|
||||||
|
|
||||||
/* According to Apple docs, default behavior is NSDateFormatterBehavior10_4 on
|
/* According to Apple docs, default behavior is NSDateFormatterBehavior10_4 on
|
||||||
10.5 and later. Yeah, go figure. */
|
10.5 and later. Yeah, go figure. */
|
||||||
|
@ -429,8 +429,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
{
|
{
|
||||||
if (locale == _locale)
|
if (locale == _locale)
|
||||||
return;
|
return;
|
||||||
if (_locale != nil)
|
RELEASE(_locale);
|
||||||
RELEASE(_locale);
|
|
||||||
|
|
||||||
_locale = RETAIN(locale);
|
_locale = RETAIN(locale);
|
||||||
[self _resetUDateFormat];
|
[self _resetUDateFormat];
|
||||||
|
@ -445,8 +444,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
|
||||||
{
|
{
|
||||||
if (tz == _tz)
|
if (tz == _tz)
|
||||||
return;
|
return;
|
||||||
if (_tz != nil)
|
RELEASE(_tz);
|
||||||
RELEASE(_tz);
|
|
||||||
|
|
||||||
_tz = RETAIN(tz);
|
_tz = RETAIN(tz);
|
||||||
[self _resetUDateFormat];
|
[self _resetUDateFormat];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue