Skip to content

Commit

Permalink
chore: don't explicitly destroy asar archives (#15734)
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Nov 19, 2018
1 parent ec4212c commit 90d1c0b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
6 changes: 1 addition & 5 deletions atom/common/api/atom_api_asar.cc
Expand Up @@ -39,8 +39,7 @@ class Archive : public mate::Wrappable<Archive> {
.SetMethod("readdir", &Archive::Readdir)
.SetMethod("realpath", &Archive::Realpath)
.SetMethod("copyFileOut", &Archive::CopyFileOut)
.SetMethod("getFd", &Archive::GetFD)
.SetMethod("destroy", &Archive::Destroy);
.SetMethod("getFd", &Archive::GetFD);
}

protected:
Expand Down Expand Up @@ -113,9 +112,6 @@ class Archive : public mate::Wrappable<Archive> {
return archive_->GetFD();
}

// Free the resources used by archive.
void Destroy() { archive_.reset(); }

private:
std::unique_ptr<asar::Archive> archive_;

Expand Down
8 changes: 0 additions & 8 deletions lib/common/asar.js
Expand Up @@ -37,14 +37,6 @@
return newArchive
}

// Clean cache on quit.
process.on('exit', () => {
for (const archive of cachedArchives.values()) {
archive.destroy()
}
cachedArchives.clear()
})

const ASAR_EXTENSION = '.asar'

// Separate asar package's path from full path.
Expand Down

0 comments on commit 90d1c0b

Please sign in to comment.