Use `ConditionalWeakTable` for Cache? #14

Open
opened 6 years ago by SimonG96 · 0 comments
SimonG96 commented 6 years ago (Migrated from github.com)
Owner

Think about the usage of a ConditionalWeakTable instead of a List<> for _cache:

432f619771/GBase/DataHandling/Cache/XmlDataHandlerCache.cs (L25)

Using a ConditionalWeakTable would probably allow the GarbageCollector to clean up instances only left in the _cache.

Is this a use case for a database though?

Think about the usage of a `ConditionalWeakTable` instead of a `List<>` for `_cache`: https://github.com/SimonG96/GBase/blob/432f61977127902b131484467521341fa8f0c8a8/GBase/DataHandling/Cache/XmlDataHandlerCache.cs#L25 Using a `ConditionalWeakTable` would probably allow the GarbageCollector to clean up instances only left in the `_cache`. Is this a use case for a database though?
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: SimonG/GBase#14
Loading…
There is no content yet.