i had a problem with memory leak in this below code ,
potential leak of an object in line 39,
and here line 39 is ,[self alloc] init];
+ (UploaderThread *)sharedUploaderThread {
@synchronized(self) {
if (_sharedUploaderThread == nil)
{
[[self alloc] init];
}
}
return _sharedUploaderThread;
}
plz help me , wer i did the mistake
You are not assigning the value to
_sharedUploaderThread. DoSince you were not assigning the value, you were leaking.