ZE FusionBot v7.9.9 #106
Secludedly
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Memory Leaks, Null References, Code Dupes = Fixed/Cleaned
v7.9.9
Fixed memory leaks across TwitchBot, YouTubeBot, DMRelayService, BotServer, TradeModule, Main, DiscordTradeNotifier, and QueueHelper.
Fixed null refs, disposable leaks, and duplicate code across SysCord, Pokepaste, and PokeTradeBotBS.
Five event handlers leaking:
They were subscribed as anonymous lambdas in ConnectInternal(), but the UnsubscribeEventHandlers() method tried to remove them by creating brand-new lambda expressions.
Fix: Added five delegate fields (_logMessageSent, etc.) that store the lambda at subscription time and are used for both += and -=.
Fix: Added IDisposable, tracked the echo forwarder lambda in _echoForwarder, and Dispose() unsubscribes all.
Fix: Implemented IDisposable with _client.MessageReceived -= HandleMessageAsync in Dispose().
Fix: Changed both to using var so the handles are released immediately.
Fix: using var httpClient = new HttpClient(); before the call.
Fix: Added FormClosed += (_, __) => { glitterTimer.Stop(); glitterTimer.Dispose(); }; inside InitGlitter().
Three separate issues in this method that fires every time the LGPE link-code embed is shown:
Fix: Stored sprite image in a separate variable and called .Dispose() after drawing; changed outputImage to using var so it auto-disposes at end of the method, then added foreach (img) img.Dispose() for the sprite array after compositing.
This method was a duplicate of the DiscordTradeNotifier version, with the same leak.
This discussion was created from the release ZE FusionBot v7.9.9.
Beta Was this translation helpful? Give feedback.
All reactions