-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Fix circular TermControl reference #14228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, won't this break hot reloading for that setting?
If our options are (1) break hot reload (2) propagate an UpdateSettings
call into the new VSM, or (3) be moderate inefficient, I'd much rather we just go for 3 and look up the parent and query the settings every time
@@ -20,12 +20,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation | |||
{ | |||
struct ScrollBarVisualStateManager : ScrollBarVisualStateManagerT<ScrollBarVisualStateManager> | |||
{ | |||
ScrollBarVisualStateManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think now that you removed the ctor, you should be able to remove the factory too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still has a constructor - it's just automatically generated by the compiler now. I tested it and it seems like it still needs the factory to exist.
@DHowett Pending on the CI the issue should be fixed now. I fixed it by simply using a |
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This regression was introduced in b3c9f01. Since
TermControl
is the XAMLobject that owns its scrollbar and the scrollbar's
VisualStateManager
a strong reference back to the
TermControl
results in a circular reference.Validation Steps Performed
TermControl::~TermControl()