#4055 Fix a memory leak when removing a transfer + data file
This commit is contained in:
parent
324f0f470c
commit
7f38a37e53
|
@ -88,8 +88,12 @@ void metadataCallback(tr_torrent * torrent, void * torrentData)
|
||||||
|
|
||||||
int trashDataFile(const char * filename)
|
int trashDataFile(const char * filename)
|
||||||
{
|
{
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
if (filename != NULL)
|
if (filename != NULL)
|
||||||
[Torrent trashFile: [NSString stringWithUTF8String: filename]];
|
[Torrent trashFile: [NSString stringWithUTF8String: filename]];
|
||||||
|
|
||||||
|
[pool drain];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue