Closed tishin closed 8 months ago
This is roughly in the ballpark of what needs to be done.
But the problem is that this constructor can be used for legitimate ownership creation, so I would like instead to have an explicit call to the variant_copy
methods on those cases. My issue is that the documentation for this is non-existent, and the ownership model that we currently have is an approximation to reality based on existing patterns and idioms.
So I would love to find what triggered this crash for you, so I can alter that codepath to call the Variant constructor that makes a copy.
Oh! I see that there is a bug linked to this!
Let me take a look.
Ok, I took a slightly different approach.
The tests work (even if I can not run them on Xcode anymore)
Fixes #390. Not sure if it's the correct solution, but the way I see it, Variant shouldn't destroy
content
which wasn't initialized for that variant and is managed somewhere else.