Skip to content

Commit 3ce05b5

Browse files
committed
dfeed.web.user: Free memory explicitly when clearing cache
1 parent 63019a9 commit 3ce05b5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/dfeed/web/user.d

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021 Vladimir Panteleev <vladimir@thecybershadow.net>
1+
/* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021, 2025 Vladimir Panteleev <vladimir@thecybershadow.net>
22
*
33
* This program is free software: you can redistribute it and/or modify
44
* it under the terms of the GNU Affero General Public License as
@@ -513,6 +513,8 @@ final class CRegisteredUser : CGuestUser
513513
if (++counter % 100 == 0)
514514
{
515515
log("Clearing cache.");
516+
foreach (username, ref cacheEntry; entries)
517+
cacheEntry.readPosts = ReadPostsData.init; // Free memory now
516518
entries = null;
517519
}
518520
}

0 commit comments

Comments
 (0)