HaikuDepot: Remove Custom List
Further removal of the use of custom list class; this time with the package lists. Relates To #15534 Change-Id: I1f01ed9d5ddbd7754097ce0adbf505d6ba17fd2f Reviewed-on: https://review.haiku-os.org/c/haiku/+/3732 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2020, Andrew Lindesay <[email protected]>.
|
||||
* Copyright 2020-2021, Andrew Lindesay <[email protected]>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef LRU_CACHE_H
|
||||
@@ -115,12 +115,11 @@ public:
|
||||
void Clear()
|
||||
{
|
||||
fMap.Clear();
|
||||
LRUNode* node = fNewestNode;
|
||||
while (node != NULL) {
|
||||
LRUNode *next = node->fOlder;
|
||||
delete node;
|
||||
node = next;
|
||||
}
|
||||
// this will delete the objects in map which are the nodes in the
|
||||
// linked list; for this reason don't delete them here as well
|
||||
// because this will lead to a double-free of the object.
|
||||
fNewestNode = NULL;
|
||||
fOldestNode = NULL;
|
||||
}
|
||||
|
||||
Value Get(const Key& key)
|
||||
|
||||
Reference in New Issue
Block a user