Skip to content

GTMSessionFetcher seems to be accumulating data, even though a a download path is specified #60

@toshGitHubIrv

Description

@toshGitHubIrv

We are using the GTMSessionFetcher (1.1.6) in order to download files from Google Drive. We are having memory issues with large files.

Previously we were using GTMFetcher, but we updated our libraries. In using the session fetcher, we are specifying a DownloadProgressBlock, DestinationFileURL and completion handler, like the following:

fetcher = [weakSelf.driveService.fetcherService fetcherWithURLString:url];

[fetcher setDownloadProgressBlock:downloadProgressHandler];
NSURL *myURL = [NSURL fileURLWithPath:fullpath];
[fetcher setDestinationFileURL:myURL];
[fetcher beginFetchWithCompletionHandler:completionHandler];

Everything downloads okay, but the memory increases and, for large files, runs out of memory.

Previously, we had the following, which did not have the memory problem:
fetcher = [weakSelf.driveService.fetcherService fetcherWithURLString:url];

[fetcher setReceivedDataBlock:receivedData]; // setReceivedDataBlock is no longer available in the updated library
[fetcher setDownloadPath:fullpath]; // setDownloadPath is no longer available in the updated library
[fetcher beginFetchWithCompletionHandler:completionHandler];

Is there some additional configuration needed, so that data is not accumulated? I tried [fetcher setAccumlatedDataBlock:nil], but that seemed to have no effect.

Thank you!
-Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions