discuss-gnustep
[Top][All Lists]
Advanced

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

time of [myobj retainCount]


From: David Wetzel
Subject: time of [myobj retainCount]
Date: Thu, 02 Dec 2004 22:42:49 +0100

hi folks,

imagine you what to do something like:

  while (currentObj = [objEnumer nextObject]) {
    if ([currentObj retainCount] == 4) {

      // some code here

    }
  }

you will find out that retainCount takes quite a lot time because there is a 
mutex that will be locked/
unlocked *each* time. Is there a way to lock this before the while loop and 
unlock after?
One which works on Apple/NeXT runtime also?
And yes, in "some code here" a release should be possible.

thanks!

dave

---
   _  _
 _(_)(_)_  David Wetzel, Turbocat's Development,
(_) __ (_) Buchhorster Strasse 23, D-16567 Muehlenbeck/Berlin, FRG,
  _/  \_   Fax +49 33056 82835 Phone +49 33056 82834
 (______)  http://www.turbocat.de/





reply via email to

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