ObjFW  Check-in [f772f8c188]

Overview
Comment:Fix a memory leak.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f772f8c1887f7fb87c61baa43528925a6986b4dee533402b674b15a1ffae6505
User & Date: js on 2012-07-15 00:54:17
Other Links: manifest | tags
Context
2012-07-16
12:19
Free memory when the last pool has been drained. check-in: 5abd9baa33 user: js tags: trunk
2012-07-15
00:54
Fix a memory leak. check-in: f772f8c188 user: js tags: trunk
00:45
Fix a bug in free_class. check-in: 1633ea5d2a user: js tags: trunk
Changes

Modified src/OFObject.m from [d5e3e3b36f] to [d6164e1afa].

615
616
617
618
619
620
621


622
623
624
625
626
627
628
	preMem->owner = self;
	preMem->prev = PRE_IVAR->lastMem;
	preMem->next = NULL;

	if (PRE_IVAR->lastMem != NULL)
		PRE_IVAR->lastMem->next = preMem;



	PRE_IVAR->lastMem = preMem;

	return (char*)pointer + PRE_MEM_ALIGN;
}

- (void*)allocMemoryWithSize: (size_t)size
		       count: (size_t)count







>
>







615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
	preMem->owner = self;
	preMem->prev = PRE_IVAR->lastMem;
	preMem->next = NULL;

	if (PRE_IVAR->lastMem != NULL)
		PRE_IVAR->lastMem->next = preMem;

	if (PRE_IVAR->firstMem == NULL)
		PRE_IVAR->firstMem = preMem;
	PRE_IVAR->lastMem = preMem;

	return (char*)pointer + PRE_MEM_ALIGN;
}

- (void*)allocMemoryWithSize: (size_t)size
		       count: (size_t)count