bugGNUstep - Bugs: bug #38955, NSURLConnection does not release...

Group
 
 

bug #38955: NSURLConnection does not release its delegate when it should

Submitter:  Cameron Pulsford <cpulsford>
Submitted:  Thu 09 May 2013 10:15:23 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  In Test
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 24 May 2013 02:35:23 PM UTC, comment #1: 

Thanks ... I think I fixed thjs in svn trunk ... please let me know.

Richard Frith-Macdonald <CaS>
Group Member
Thu 09 May 2013 10:15:23 PM UTC, original submission:  

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

Cameron Pulsford <cpulsford>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #28056:  NSURLConnectionBug.zip added by cpulsford (47KiB - application/zip)
file #28057:  RPMHTTPConnection.m added by cpulsford (7KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by cpulsford (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-24 CaS StatusNone Fixed
        Open/ClosedOpen In Test
    2013-05-09 cpulsford Attached File- Added NSURLConnectionBug.zip, #28056
        Attached File- Added RPMHTTPConnection.m, #28057

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code