HomeChallengesRepsProblemsLeaderboardTake a challenge

The leak you can read

An event handler nobody unsubscribes, and a static cache that only grows.

Beginner15 min on the clock4 graded checks · 100 pointsResources and Concurrency
Graded by reading your code against the checklist below.

What you build

  • Unsubscribe from the event when the object is finished with
  • Give the class somewhere for that unsubscription to live
  • Replace the unbounded static dictionary with something that evicts
  • Leave no static collection that can only grow

Done means

The handler is unsubscribed, and nothing left in the class can grow without limit.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. The handler is unsubscribed+30Leaks you can see in the source
  2. There is somewhere for the unsubscribe to happen+25Giving resources back
  3. The cache evicts+25Leaks you can see in the source
  4. No static collection left that only grows+20Leaks you can see in the source

What it teaches

The rest of Resources and Concurrency