-
-
Notifications
You must be signed in to change notification settings - Fork 499
Fix #4029: Expire vector display instances after SVG destruction #4041
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
Conversation
|
This will be merged shortly, first we'll just get a nightly build that only includes the LunaSVG vendor update (#4067), in case we need to distinguish testing results for any reason. |
|
|
||
| void CClientVectorGraphic::OnUpdate() | ||
| { | ||
| if (!m_pVectorGraphicDisplay) |
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.
Is this situation possible?
|
How does your fix work? |
|
See #4108 |
Resolves #4029 by using the functionality in
CClientDisplayManager::DoPulsewhich cleans up expired elements.After the underlying vector graphic has been destroyed, an expiration of 1ms is set on the vector display instance so the manager can clean it up automatically.
Display instances are already destroyed/cleared upon destruction of the display manager.
Tested lightly by creating multiple SVGs, modifying them (updating, destroying) and manually tracking the lifetime of display instances in debugger. Seems to work as intended through restarting resources, disconnecting & exiting the client.