Usually, the replotting/painting is orders of magnitude slower than the data copying, so only care about this if you have actually measured that data copying is the problem.
If I comment out the set Text() and set Num() calls and reroute the outputs to the console, it runs fine and never crashes.
So if you delete the pointer on the outside, or try to access the pointer after the graph has been removed from the plot, your application will segfault/crash.
So using this high performance method is quite a commitment – synchronizing the lifetime of the external pointer with the lifetime of the graph.
) or simply tinker with them to see how they have been built and how the toolkit works.
You can access this code repository at https://github.com/shotgunsoftware/tk-framework-qtwidgets. Below you will find an overview of all the changes we did for each release.