Page MenuHomeFeedback Tracker

RestCallbacks are leaking Memory (1.27 Experimental)
Awaiting internal Testing, NormalPublic

Description

When trying my mods on the new experimental build, I noticed, that all my RestCallback classes I have appear in the Leaks printed when the game exists. This seems to be an issue with the vanilla RestCallback and RestContext classes not releasing the callbacks after the response was received. I never keep any refs of the callbacks.
ctx.POST(new LB_WebhookCallback(type, message, description), "", message);
class LB_WebhookCallback : RestCallback {}
causing SCRIPT (E): Leaked 'WebHookCallBack' script instance (1x)!

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General

Event Timeline

LBmaster created this task.Jan 29 2025, 1:04 AM
Geez changed the task status from New to Awaiting internal Testing.Jan 29 2025, 11:02 AM

This issue came earlier then 1.27 Exp.
Started to encounter already on prev patch.

Stock RestCallback dont have such issue, you need to modify it to some point, so it becomes an dangling obj.

yeah, probably has been an issue before, but now we see the leaked instances in the logs, we did not have this before