Differences From Artifact [3d989f9035]:
- File
src/OFDictionary.m
— part of check-in
[d4b379485a]
at
2010-07-08 08:57:00
on branch trunk
— Don't retain + autorelease objects returned from collections.
This increases performance and should not need to be handled by the
programmer in most cases. (user: js, size: 14017) [annotate] [blame] [check-ins using]
To Artifact [bf50d5443a]:
- File src/OFDictionary.m — part of check-in [c5d65603d8] at 2010-08-28 18:54:35 on branch trunk — Initial support for blocks. (user: js, size: 14298) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
632 633 634 635 636 637 638 639 640 641 642 643 644 645 | - (OFEnumerator*)keyEnumerator { return [[[OFDictionaryKeyEnumerator alloc] initWithData: data size: size mutationsPointer: NULL] autorelease]; } - (void)dealloc { uint32_t i; for (i = 0; i < size; i++) { if (data[i] != NULL && data[i] != DELETED) { | > > > > > > > > > > > > > | 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - (OFEnumerator*)keyEnumerator { return [[[OFDictionaryKeyEnumerator alloc] initWithData: data size: size mutationsPointer: NULL] autorelease]; } #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { size_t i; BOOL stop = NO; for (i = 0; i < size && !stop; i++) if (data[i] != NULL && data[i] != DELETED) block(data[i]->key, data[i]->object, &stop); } #endif - (void)dealloc { uint32_t i; for (i = 0; i < size; i++) { if (data[i] != NULL && data[i] != DELETED) { |
︙ | ︙ |