While examining the entire GUI for useless (especially implicit/obfuscated) copies by adding the NONCOPYABLE keyword everywhere, I found this copy and deletion.
The code looks like a primary example of a use case for a shared_ptr, because the thing gets created once, then assigned to N users, then the users disappear sometime later.
With a shared_ptr we don't have to care about erasure, when the last user is gone, the thing gets deleted.
With raw pointers, one wont be able to tell who has the responsibility to delete, so the current code just copies it.
I measured the performance by doing a benchmark and it is indeed faster to use the shared_ptr, 2.5 times faster.
Also if we look at the data structures, the effect has one bool and two colors, each of which have 4 floats,
whereas the shared_ptr only has the pointer and the reference counter afaik.
So all gathered evidence indicates that this is better off with a shared_ptr.