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

 
 

You are not allowed to post comments on this tracker with your current authentification level.

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

Submitted by:  Cameron Pulsford <cpulsford>
Submitted on:  Thu 09 May 2013 10:15:23 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: In Test

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>
Project 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>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 May 2013 02:35:23 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test
    Thu 09 May 2013 10:15:23 PM UTCcpulsfordAttached File-=>Added NSURLConnectionBug.zip, #28056
      Attached File-=>Added RPMHTTPConnection.m, #28057

    Back to the top


    Powered by Savane 3.1-cleanup