It would appear that the marker is added to the shared buffer
Oh, I misread the code - I thought it was using `SCI_GETCHARACTERPOINTER` and that would be sharing just `gchar *`. But it's `SCI_GETDOCPOINTER` so it's the Scintilla's "document" which is shared and it probably stores the information about markers too.
So yeah, it's less mysterious now and also probably not something we can fix easily.