discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory leak in NSControl ?


From: Frederic De Jaeger
Subject: Memory leak in NSControl ?
Date: Fri, 22 Sep 2000 14:35:47 +0200

        Hello,
I think there's a memory leak in NSControl in the copyWithZone method:

- (id) copyWithZone: (NSZone*)zone
{
  id            c = NSCopyObject(self, 0, zone);
  NSCell        *o = [_cell copy];

  [c setCell: o];
  RELEASE(o);
  return c;
}

One should add 
c->_cell = nil;
just after the creation of c(by the NSCopyObject function).
Am I wrong ?

Regards,

        Frederic De Jaeger


reply via email to

[Prev in Thread] Current Thread [Next in Thread]