mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
More optimisation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10050 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d4d9022b03
commit
ebba65ddcb
2 changed files with 15 additions and 3 deletions
|
@ -1,8 +1,10 @@
|
|||
2001-06-01 Richard Frith-Macdonald <rfm@gnu.uk>
|
||||
|
||||
Optimisations suggested by Guenther Fuerthaller
|
||||
* Source/NSZone.m: NSZonefromPointer() check for empty zones
|
||||
list before locking ... optimisation suggested by
|
||||
Guenther Fuerthaller
|
||||
list before locking.
|
||||
* Source/NSData.m: more efficient dealloc implementation for
|
||||
NSMutableDataMalloc.
|
||||
|
||||
2001-06-01 Nicola Pero <nicola@brainstorm.co.uk>
|
||||
|
||||
|
|
|
@ -2554,6 +2554,16 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
initWithBytes: bytes length: length];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (bytes != 0)
|
||||
{
|
||||
NSZoneFree(zone, bytes);
|
||||
bytes = 0;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithBytes: (const void*)aBuffer length: (unsigned)bufferSize
|
||||
{
|
||||
self = [self initWithCapacity: bufferSize];
|
||||
|
@ -3082,7 +3092,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (bytes)
|
||||
if (bytes != 0)
|
||||
{
|
||||
struct shmid_ds buf;
|
||||
|
||||
|
|
Loading…
Reference in a new issue