mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
More GC tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4953 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c315156563
commit
11ef04f603
12 changed files with 72 additions and 57 deletions
|
@ -165,7 +165,7 @@ mframe_build_signature(const char *typePtr, int *size, int *narg, char *buf)
|
|||
*/
|
||||
if (doMalloc)
|
||||
{
|
||||
char *tmp = objc_malloc(dest - buf + 1);
|
||||
char *tmp = NSZoneMalloc(NSDefaultMallocZone(), dest - buf + 1);
|
||||
|
||||
strcpy(tmp, buf);
|
||||
buf = tmp;
|
||||
|
@ -1355,7 +1355,7 @@ mframe_build_return_opts (arglist_t argframe,
|
|||
retLength = objc_sizeof_type(tmptype);
|
||||
/* Allocate memory to hold the value we're pointing to. */
|
||||
*(void**)retframe =
|
||||
objc_malloc (retLength);
|
||||
NSZoneMalloc(NSDefaultMallocZone(), retLength);
|
||||
/* We are responsible for making sure this memory gets free'd
|
||||
eventually. Ask NSData class to autorelease it. */
|
||||
[NSData dataWithBytesNoCopy: *(void**)retframe
|
||||
|
@ -1559,9 +1559,9 @@ mframe_destroy_argframe(const char *types, arglist_t argframe)
|
|||
|
||||
if (stack_argsize)
|
||||
{
|
||||
objc_free(argframe->arg_ptr);
|
||||
NSZoneFree(NSDefaultMallocZone(), argframe->arg_ptr);
|
||||
}
|
||||
objc_free(argframe);
|
||||
NSZoneFree(NSDefaultMallocZone(), argframe);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue