Skip to content
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 for GC Allocations inside TooltipHandler #311

Conversation

stefanbursuc
Copy link
Contributor

In the case where the pointer is not in the chart, both calls to ListPool<Serie>.Get() from inside the function UpdateTooltipData are executed.

And because the pointer is not in the chart, m_ShowTooltip is set to false in the last else clause.

This makes UpdateTooltip to skip all logic and miss the chance to release the list back to the pool.

In the case where the pointer is not in the chart, both calls to
ListPool<Serie>.Get() from inside the function UpdateTooltipData
are executed.

And because the pointer is not in the chart, m_ShowTooltip is set to
false in the last else clause.

This makes UpdateTooltip to skip all logic and miss the chance to release
the list back to the pool.
@monitor1394
Copy link
Collaborator

Thank you for your PR. It work well in single chart.
But in this case, the Line tooltip will not be displayed.
image

@monitor1394 monitor1394 merged commit b86cae6 into XCharts-Team:master May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants