[bug #56029] Memory Leak using @synchronized on Windows

Fred Kiefer <[email protected]>
Newsgroups gmane.comp.lib.gnustep.bugs
Message-ID <[email protected]>
Update of bug #56029 (project gnustep):

                  Status:                    None => Ready For Test         
             Assigned to:                    None => FredKiefer             
             Open/Closed:                    Open => In Test                

    _______________________________________________________

Follow-up Comment #2:

David just made a couple pf changes to libobjc2, that will end up in the
upcoming release 2.0. One of these should fix the reported issue:


- A memory leak in @synchronized that Fred pointed out.  We only leaked a few
bytes for every object used with @synchronized, but in a loop it was easy for
this to be a problem.  I had not seen this issue because I avoid using
@synchronized entirely.  It is a horrible feature in Objective-C and using
__attribute__((cleanup)) for the unlock in C (or RAII in C++) lets you
accomplish the same thing with less inefficiency.  The feature wouldn't be
such a problem if it were defined to send -lock / -unlock messages to the
object, but requiring the runtime to maintain a lock for each object is
awkward.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56029>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.