01-30-2019, 10:13 PM
Yes, I think this is just a misunderstanding of the functionality. I suppose the documentation could be a little clearer so I'll add that to our TODOs.
In any event, you cannot store an entire copy of a piece of art in a dictionary. Instead, what you're storing is a reference to the piece of art in the document, and if you dispose of the original piece of art then the reference is useless. Here's another way to look at it: in Illustrator, it is not possible to have a piece of art exist purely in memory – it must exist on the document to even get an AIArtHandle (and therefore a hdi::core::Art object) for it.
In any event, you cannot store an entire copy of a piece of art in a dictionary. Instead, what you're storing is a reference to the piece of art in the document, and if you dispose of the original piece of art then the reference is useless. Here's another way to look at it: in Illustrator, it is not possible to have a piece of art exist purely in memory – it must exist on the document to even get an AIArtHandle (and therefore a hdi::core::Art object) for it.