Differences From Artifact [39169fee1e]:
- File
src/OFDictionary.m
— part of check-in
[bfb7745f95]
at
2011-07-28 20:50:09
on branch trunk
— Don't create and release a pool in -[enumerateObjectsUsingBlock:].
This would make it impossible to use autoreleased objects after the
block has been executed without manually retaining and releasing them. (user: js, size: 20540) [annotate] [blame] [check-ins using]
To Artifact [45afb75ecd]:
- File src/OFDictionary.m — part of check-in [927dbf6e7d] at 2011-08-07 16:57:49 on branch trunk — Add -[makeImmutable] to all mutable classes and use it. (user: js, size: 19850) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
748 749 750 751 752 753 754 | [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, BOOL *stop) { [new setObject: block(key, object) forKey: key]; }]; | < | | < < < < | | < < < | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, BOOL *stop) { [new setObject: block(key, object) forKey: key]; }]; [new makeImmutable]; return new; } - (OFDictionary*)filteredDictionaryUsingBlock: (of_dictionary_filter_block_t)block { OFMutableDictionary *new = [OFMutableDictionary dictionary]; [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, BOOL *stop) { if (block(key, object)) [new setObject: object forKey: key]; }]; [new makeImmutable]; return new; } #endif - (void)dealloc { uint32_t i; |
︙ | ︙ | |||
855 856 857 858 859 860 861 862 863 | [pool2 releaseObjects]; } [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @";\n}"]; [pool release]; | > > < < < < < < | 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | [pool2 releaseObjects]; } [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @";\n}"]; [ret makeImmutable]; [pool release]; return ret; } - (OFXMLElement*)XMLElementBySerializing { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFAutoreleasePool *pool2; |
︙ | ︙ |