Re: what's an NSZone?
Re: what's an NSZone?
- Subject: Re: what's an NSZone?
- From: Nat! <email@hidden>
- Date: Sat, 16 Feb 2002 00:23:06 +0100
Am Freitag den, 15. Februar 2002, um 23:46, schrieb Timothy J. Wood:
I find this interesting since Apple DOES use zones internally
(in particular, CoreGraphics creates a zone). If you look in
<objc/malloc.h> you will find something analogous to an NSZone,
the malloc_zone_t. While NSZone and malloc_zone_t do basically
the same sorts of things, they are not interchangable sadly.
It would be much nicer if Apple made NSZone and malloc_zone_t be
the same thing and actually allowed developers to build real
zones. This is very useful in some limited cases -- documentation
should be used to dissuade people from misuse, not by just taking
away our toys.
I've been considering adding +allocWithMallocZone: as a category
on NSObject ... :)
-tim
And then there is the CFAllocator in Corefoundation, which isn't
interchangeable with NSZone as well, but appears to be pretty much
the same idea.
Nat!
------------------------------------------------------
Some people drink deep from the fountains of life, and
some just gargle. -- DLR
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.