1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 06:09:53 +08:00
Files
osu-lazer/osu.Game/Online/Chat
T
Dan Balasescu 02cb93d854 Fix leak from polling chat client being initialised too early
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
..
2024-11-26 13:25:57 +09:00
2025-02-24 09:35:51 +01:00
2023-06-24 01:00:03 +09:00
2024-01-25 14:47:29 +01:00
2024-08-30 18:35:31 +09:00