-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip's need revised for GC #941
Labels
bug
Something isn't working or doesn't work as expected.
Comments
The problem is indeed the This is the solution I came up with for the Mystic Crafting module: public class DisposableTooltip : Tooltip
{
public DisposableTooltip(ITooltipView tooltipView) : base(tooltipView) { }
private void RemoveFromCollection()
{
var type = typeof(Tooltip);
var field = type.GetField("_allTooltips", BindingFlags.NonPublic | BindingFlags.Static);
if (field == null)
return;
var tooltips = (ControlCollection<Tooltip>)field.GetValue(null);
if (tooltips == null)
return;
tooltips.Remove(this);
}
protected override void DisposeControl()
{
RemoveFromCollection();
base.DisposeControl();
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an issue with Tooltips that prevents them from being properly collected. Some initial investigation is discussed here:
https://discord.com/channels/531175899588984842/599270434642460753/1208556624902492250
The text was updated successfully, but these errors were encountered: