ObjFW  Check-in [41cdf54612]

Overview
Comment:Fix a memory leak in OFArray.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 41cdf54612e8e13b67728266dcbf5682b6a3d4f9f4748d843bee286f7d81fdd8
User & Date: js on 2011-07-14 23:19:04
Other Links: manifest | tags
Context
2011-07-15
10:30
Make sure restrict is always defined. check-in: 77fe5572fe user: js tags: trunk
2011-07-14
23:19
Fix a memory leak in OFArray. check-in: 41cdf54612 user: js tags: trunk
23:17
Fix a memory leak in OFURL. check-in: 06bbeb185a user: js tags: trunk
Changes

Modified src/OFArray.m from [4847514de9] to [d4b4c05d50].

507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFAutoreleasePool *pool2;
	OFXMLElement *element;
	id <OFSerialization> *cArray = [array cArray];
	size_t i, count = [array count];

	element = [[OFXMLElement alloc] initWithName: [self className]
					   namespace: OF_SERIALIZATION_NS];

	pool2 = [[OFAutoreleasePool alloc] init];

	for (i = 0; i < count; i++) {
		[element addChild: [cArray[i] XMLElementBySerializing]];

		[pool2 releaseObjects];







|
|







507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFAutoreleasePool *pool2;
	OFXMLElement *element;
	id <OFSerialization> *cArray = [array cArray];
	size_t i, count = [array count];

	element = [OFXMLElement elementWithName: [self className]
				      namespace: OF_SERIALIZATION_NS];

	pool2 = [[OFAutoreleasePool alloc] init];

	for (i = 0; i < count; i++) {
		[element addChild: [cArray[i] XMLElementBySerializing]];

		[pool2 releaseObjects];