Fix another small memory allocation issue.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32537 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stefanbidi 2011-03-12 14:42:21 +00:00
parent 82d7dabe9e
commit 622ad2647f

View file

@ -436,13 +436,20 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
#if GS_USE_ICU == 1
unum_close (internal->_formatter);
#endif
for (idx = 0 ; idx < MAX_SYMBOLS ; ++idx )
RELEASE(internal->_symbols[idx]);
NSZoneFree (z, internal->_symbols);
for (idx = 0 ; idx < MAX_TEXTATTRIBUTES ; ++idx )
RELEASE(internal->_textAttributes[idx]);
NSZoneFree (z, internal->_textAttributes);
NSZoneFree (z, internal->_attributes);
if (internal->_symbols)
{
for (idx = 0 ; idx < MAX_SYMBOLS ; ++idx )
RELEASE(internal->_symbols[idx]);
NSZoneFree (z, internal->_symbols);
}
if (internal->_textAttributes)
{
for (idx = 0 ; idx < MAX_TEXTATTRIBUTES ; ++idx )
RELEASE(internal->_textAttributes[idx]);
NSZoneFree (z, internal->_textAttributes);
}
if (internal->_attributes)
NSZoneFree (z, internal->_attributes);
GS_DESTROY_INTERNAL(NSNumberFormatter)
}
[super dealloc];