Skip to content

Commit

Permalink
Fix ram usage for bulk downloads (inline mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kropatz committed Dec 28, 2024
1 parent 13c9a8b commit e2bd6e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inline/inline.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ func Run(options *Options) (err error) {
if err != nil {
log.Warn(err)
}
// free memory after downloading
for _, page := range chapter.Pages {
page.Contents = nil
}
} else {
err := downloader.Read(chapter, func(string) {})
if err != nil {
Expand Down

0 comments on commit e2bd6e4

Please sign in to comment.