Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory footprint issues when unzipping large archives #18

Open
GoogleCodeExporter opened this issue Mar 23, 2016 · 3 comments
Open

Memory footprint issues when unzipping large archives #18

GoogleCodeExporter opened this issue Mar 23, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

When unzipping large archives, the footprint of -[ZipArchive 
UnzipFileTo:overwrite:] can become very large, because there are autoreleased 
objects created for each individual file during the unzip.  These don't get 
released until after the call returns, when the autorelease pool is next 
drained.

To fix the problem, add another pool inside the do{}while in -[ZipArchive 
UnzipFileTo:overwrite:] :



    do{
        NSAutoreleasePool *internalPool = [[NSAutoreleasePool alloc] init];

        if( [_password length]==0 )
...
        ret = unzGoToNextFile( _unzFile );

        [internalPool drain];
    }while( ret==UNZ_OK && UNZ_OK!=UNZ_END_OF_LIST_OF_FILE );

Original issue reported on code.google.com by ja...@th.ingsmadeoutofotherthin.gs on 14 Feb 2011 at 3:40

@GoogleCodeExporter
Copy link
Author

Yes! I encountered this problem myself and joined the project to add a fix for 
this, among other things.  Thank you for submitting this issue~

Original comment by elinc...@hachisoft.com on 15 Feb 2011 at 7:41

  • Changed state: Started
  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Issue 10 has been merged into this issue.

Original comment by elinc...@hachisoft.com on 15 Feb 2011 at 8:13

@GoogleCodeExporter
Copy link
Author

Has this fix been rolled into the source? If not, any chance I can get this 
fix? We are running into this ourselves and this fix would help us greatly.

Thanks!

Original comment by grum...@gmail.com on 28 Feb 2011 at 12:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant