Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1356

Memory leak and other issues in TSocketClient

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 0.7
    • 0.13.0
    • Cocoa - Library
    • None
    • iOS 4.3

    • Patch Available

    Description

      The socket setup code in TSocketClient seems to have been copied blindly from Apple's docs. The two problems with that are:

      (a) The example is for non-blocking event-based network IO, but Thrift uses it in blocking mode and does not handle the delegate events it registers for. This causes network operations to randomly hang.

      (b) It retains the input and output streams, which already have a retain count of 1, and which are then retained again by the superclass, causing a memory leak.

      Attachments

        1. TSocketClient.m
          2 kB
          Matthew Phillips

        Activity

          People

            jking3 James E. King III
            scramjet Matthew Phillips
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: