English 中文(简体)
我得到了一个“ 调用器目前不拥有的物体的引用计数减少不正确” 。
原标题:I get a "Incorrect decrement of the reference count of an object that is not owned at this point by the caller"

当我做分析 找出潜在的内存泄漏, 我得到一个"错误的 引用计数的减少 在一个物体的引用计数 在这一点上不是由调用者拥有的" :

- (int)downloadUrlTofolder:(NSString *)url filename:(NSString *)name tryTime:(int)tryTime
{
    int result = 0;
     GetFtpService *ftpService = [[GetFtpService alloc] initwithUrlandOutPut:url output:name];

    //I have delete the code here, but problem is not solved.

    [ftpService release];  //the potential problem point to this line
    return result;
}

下面是“与乌兰地外溢”的方法:

- (id)initwithUrlandOutPut:(NSString *)url output:(NSString *)o
{
    if(self = [super init]) {
        self.urlInput = url;
        self.outPath = o;
        self.success = [NSString stringWithString:@"success"];
        self.connected = nil;
    }

    return self;
}

和界面:

@interface GetFtpService : NSObject <NSStreamDelegate>

@property (nonatomic, retain) NSInputStream *networkStream;
@property (nonatomic, copy) NSString *urlInput;
@property (nonatomic, retain) NSInputStream *fileStream;
@property (nonatomic, copy) NSString *outPath;
@property int tryTime;
@property (nonatomic, copy) NSString *success;
@property (nonatomic, copy) NSString *connected;

- (id) initwithUrlandOutPut:(NSString *)url output:(NSString *)o;

我想知道为什么会发生这种事?

最佳回答

我怀疑是因为"与..."中的"与..."没有资本化。也许分析师没有认识到这个方法是因这个方法而来的。

问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签