mirror of
https://github.com/ppy/osu.git
synced 2026-05-26 06:09:53 +08:00
02cb93d854
This one is quite dumb. `OsuGame` uses [`loadComponentSingleFile`](https://github.com/ppy/osu/blob/15878f7f9fc7088494d3b66e98a7bc1004a1a06d/osu.Game/OsuGame.cs#L1228) to load the `ChannelManager`. Importantly, this process does _not_ add the component to any place in the hierarchy where it would normally be disposed - this includes `InternalChildren`, but _also_ a lesser known list of [currently-loading components](https://github.com/ppy/osu-framework/blob/cfb0d7b4b673583f0cf56273e94352769aa5bc9a/osu.Framework/Graphics/Containers/CompositeDrawable.cs#L316-L323) (those which have been sent through a `LoadComponentAsync` call). The end result of this is that, `ChannelManager` creates the `IChatClient` in its constructor, expecting to be able to dispose it, but `Dispose` is never called! And the failure case here is that `PollingChatClient` creates a background task to continuously poll the API, unfortunately keeping a reference to the rest of the world in the process.
02cb93d854
·
2025-07-09 03:37:02 +09:00
History