bug-gnustep
[Top][All Lists]
Advanced

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

[bug #38955] NSURLConnection does not release its delegate when it shoul


From: Cameron Pulsford
Subject: [bug #38955] NSURLConnection does not release its delegate when it should
Date: Thu, 09 May 2013 22:15:25 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.28.10 (KHTML, like Gecko) Version/6.0.3 Safari/536.28.10

URL:
  <http://savannah.gnu.org/bugs/?38955>

                 Summary: NSURLConnection does not release its delegate when
it should
                 Project: GNUstep
            Submitted by: cpulsford
            Submitted on: Thu 09 May 2013 10:15:23 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I am running on an Intel NUC running debian wheezy, with hand built gnustep
1.24. My GCC is version 4.7.2.

This is sort of a corollary to this bug:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=35686

I have written a wrapper around NSURLConnection called RPMHTTPConnection. In
the attached test program, I alloc/init an RPMHTTPConnection, send a request,
receive a callback, and then release the RPMHTTPConnection instance. However,
-dealloc is never called in my RPMHTTPConnection class and I suspect that the
underlying NSURLConnection is not releasing its delegate after the request
finishes. If I am more eager about releasing the NSURLConnection, like
releasing it in the method where RPMHTTPConnection calls its own delegate, the
dealloc is called as I would expect. 

Today, May 9th 2013, I checked out the latest gnustep and I do not see
_delegate being released after the connection finished or fails.

When I run the attached program I get this output:

NSURLConnectionBug[16514] got response from instance: 0x9b19e74, data length:
44074

When I run the equivalent program on my Mac I get this output:

NSURLConnectionBug[9650] got response from instance: 0x9d8e22c, data length:
44074
NSURLConnectionBug[9650] deallocing instance: 0x9d8e22c



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 09 May 2013 10:15:23 PM GMT  Name: NSURLConnectionBug.zip  Size:
47kB   By: cpulsford

<http://savannah.gnu.org/bugs/download.php?file_id=28056>
-------------------------------------------------------
Date: Thu 09 May 2013 10:15:23 PM GMT  Name: RPMHTTPConnection.m  Size: 7kB  
By: cpulsford

<http://savannah.gnu.org/bugs/download.php?file_id=28057>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38955>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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